Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Ubuntu 2004

    Description

      Sometimes a transaction fails because of a temporary reason, like 1213 (deadlock). The message tells us to try anew. I'd like to have a function like verified_transaction_name() that will automatically try again in cases like these instead of delegating that to the user.

      I meant to post this for the C++-Connector, but wasn't able to choose it from the drop-down list.

      Attachments

        Activity

          it seems that the appropriate name should be "auto-retrying of transactions" or "auto-replaying".
          And likely it should be implemented in Connector/C, where Connector/C++ would just invoke it from there.
          Lawrin, thoughts?

          serg Sergei Golubchik added a comment - it seems that the appropriate name should be "auto-retrying of transactions" or "auto-replaying". And likely it should be implemented in Connector/C, where Connector/C++ would just invoke it from there. Lawrin , thoughts?

          serg Maybe right in the server then? Then it will be everywhere, and server better knows what reasons are temporary(to track if new such error emerge), at least.

          Does it feel like that is something belonging to C/C for you? I am not sure.

          Also I am not sure about details. Like what if transaction fails again? Repeat till some till some time before some timeout? or some special timeout? or for configurable number of times? and what if it still fails? some new special error or same error? what if errors were different(I don't know if that is possible, ). Does it have to be applied to all transactions on the connection? Does it have to be applied to all such temporary reasons or to the configurable list of reasons. Also, different reasons might need different auto-replying pattern, like if we have deadlock, period of re-sending of commit should be somehow depend on the related server timeouts.
          Well, most of the questions can be answered by "keep it simple" and at the end we will have smth like
          if (error in <the_list_of_temporary_reasons>)
          while (<replay_number_option>-- > 0) mysql_commit(conn_handle);

          Lawrin Lawrin Novitsky added a comment - serg Maybe right in the server then? Then it will be everywhere, and server better knows what reasons are temporary(to track if new such error emerge), at least. Does it feel like that is something belonging to C/C for you? I am not sure. Also I am not sure about details. Like what if transaction fails again? Repeat till some till some time before some timeout? or some special timeout? or for configurable number of times? and what if it still fails? some new special error or same error? what if errors were different(I don't know if that is possible, ). Does it have to be applied to all transactions on the connection? Does it have to be applied to all such temporary reasons or to the configurable list of reasons. Also, different reasons might need different auto-replying pattern, like if we have deadlock, period of re-sending of commit should be somehow depend on the related server timeouts. Well, most of the questions can be answered by "keep it simple" and at the end we will have smth like if (error in <the_list_of_temporary_reasons>) while (<replay_number_option>-- > 0) mysql_commit(conn_handle);

          it's not just mysql_commit(conn_handle), one has to replay the whole transaction. There are different ways of doing it and they all can easily go horribly wrong. So this feature has a rather limited applicability. It does come handy is some specific use cases though.

          serg Sergei Golubchik added a comment - it's not just mysql_commit(conn_handle) , one has to replay the whole transaction. There are different ways of doing it and they all can easily go horribly wrong. So this feature has a rather limited applicability. It does come handy is some specific use cases though.

          People

            Lawrin Lawrin Novitsky
            JJworx Jochen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.