Hyperledger transaction become failed when submit transaction in for loop











up vote
0
down vote

favorite












I am new in hyperledger technologie.I successfully deployed my network file(.bna). Then I started rest api using command composer-rest-server. I submit single transaction using my front end leravel application. When I try using for loop for submiting multiple transaction , I get an error in some time that MVCC_READ_CONFLICT . I decrease my network's bachtimeout. But error is continue. Please answer any one if you have any idea about this issue.



Fabric vertion: 1.1.0
Composer : .19.16
Node :8.12
OS: Ubuntu 16.04










share|improve this question


























    up vote
    0
    down vote

    favorite












    I am new in hyperledger technologie.I successfully deployed my network file(.bna). Then I started rest api using command composer-rest-server. I submit single transaction using my front end leravel application. When I try using for loop for submiting multiple transaction , I get an error in some time that MVCC_READ_CONFLICT . I decrease my network's bachtimeout. But error is continue. Please answer any one if you have any idea about this issue.



    Fabric vertion: 1.1.0
    Composer : .19.16
    Node :8.12
    OS: Ubuntu 16.04










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am new in hyperledger technologie.I successfully deployed my network file(.bna). Then I started rest api using command composer-rest-server. I submit single transaction using my front end leravel application. When I try using for loop for submiting multiple transaction , I get an error in some time that MVCC_READ_CONFLICT . I decrease my network's bachtimeout. But error is continue. Please answer any one if you have any idea about this issue.



      Fabric vertion: 1.1.0
      Composer : .19.16
      Node :8.12
      OS: Ubuntu 16.04










      share|improve this question













      I am new in hyperledger technologie.I successfully deployed my network file(.bna). Then I started rest api using command composer-rest-server. I submit single transaction using my front end leravel application. When I try using for loop for submiting multiple transaction , I get an error in some time that MVCC_READ_CONFLICT . I decrease my network's bachtimeout. But error is continue. Please answer any one if you have any idea about this issue.



      Fabric vertion: 1.1.0
      Composer : .19.16
      Node :8.12
      OS: Ubuntu 16.04







      hyperledger-fabric hyperledger hyperledger-composer






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 7 at 12:17









      salman faris

      106




      106
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          Well, MVCC_READ_CONFLICT means you are doing concurrent modification for some key in two different transactions, hence after transaction being ordered into block, whatever transaction gets in first committed while second one or subsequent transaction which works on same key marked invalid with MVCC_READ_CONFLICT.



          To understand better the reason behind this status it's probably worth noting the transaction flow in fabric:




          1. Client submit transaction proposal for endorsement sending it to endorsing peers

          2. Endorsing peers executes simulation of chaincode where execution results are captured into Read-Write Set

          3. Client collects endorsements and composes transaction, submitting it for ordering

          4. Ordering service batches transactions into block employing total order of transactions

          5. Block distributed between peers

          6. Peer conducts validation to attest conformance with endorsement policy for each transaction

          7. After that there is multi value concurrency control (MVCC), which checks for concurrent modifications, in fact validating keys version of RWSet and if concurrent modification detected tx invalidated with status MVCC_READ_CONFLICT


          You can find more details in documentation "Transaction Flow".






          share|improve this answer





















          • Thank you for answering. There is any way or any idea available to prevent MVCC_READ_CONFLICT. Please give a suggestion.
            – salman faris
            Nov 8 at 4:09











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53189313%2fhyperledger-transaction-become-failed-when-submit-transaction-in-for-loop%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          Well, MVCC_READ_CONFLICT means you are doing concurrent modification for some key in two different transactions, hence after transaction being ordered into block, whatever transaction gets in first committed while second one or subsequent transaction which works on same key marked invalid with MVCC_READ_CONFLICT.



          To understand better the reason behind this status it's probably worth noting the transaction flow in fabric:




          1. Client submit transaction proposal for endorsement sending it to endorsing peers

          2. Endorsing peers executes simulation of chaincode where execution results are captured into Read-Write Set

          3. Client collects endorsements and composes transaction, submitting it for ordering

          4. Ordering service batches transactions into block employing total order of transactions

          5. Block distributed between peers

          6. Peer conducts validation to attest conformance with endorsement policy for each transaction

          7. After that there is multi value concurrency control (MVCC), which checks for concurrent modifications, in fact validating keys version of RWSet and if concurrent modification detected tx invalidated with status MVCC_READ_CONFLICT


          You can find more details in documentation "Transaction Flow".






          share|improve this answer





















          • Thank you for answering. There is any way or any idea available to prevent MVCC_READ_CONFLICT. Please give a suggestion.
            – salman faris
            Nov 8 at 4:09















          up vote
          2
          down vote













          Well, MVCC_READ_CONFLICT means you are doing concurrent modification for some key in two different transactions, hence after transaction being ordered into block, whatever transaction gets in first committed while second one or subsequent transaction which works on same key marked invalid with MVCC_READ_CONFLICT.



          To understand better the reason behind this status it's probably worth noting the transaction flow in fabric:




          1. Client submit transaction proposal for endorsement sending it to endorsing peers

          2. Endorsing peers executes simulation of chaincode where execution results are captured into Read-Write Set

          3. Client collects endorsements and composes transaction, submitting it for ordering

          4. Ordering service batches transactions into block employing total order of transactions

          5. Block distributed between peers

          6. Peer conducts validation to attest conformance with endorsement policy for each transaction

          7. After that there is multi value concurrency control (MVCC), which checks for concurrent modifications, in fact validating keys version of RWSet and if concurrent modification detected tx invalidated with status MVCC_READ_CONFLICT


          You can find more details in documentation "Transaction Flow".






          share|improve this answer





















          • Thank you for answering. There is any way or any idea available to prevent MVCC_READ_CONFLICT. Please give a suggestion.
            – salman faris
            Nov 8 at 4:09













          up vote
          2
          down vote










          up vote
          2
          down vote









          Well, MVCC_READ_CONFLICT means you are doing concurrent modification for some key in two different transactions, hence after transaction being ordered into block, whatever transaction gets in first committed while second one or subsequent transaction which works on same key marked invalid with MVCC_READ_CONFLICT.



          To understand better the reason behind this status it's probably worth noting the transaction flow in fabric:




          1. Client submit transaction proposal for endorsement sending it to endorsing peers

          2. Endorsing peers executes simulation of chaincode where execution results are captured into Read-Write Set

          3. Client collects endorsements and composes transaction, submitting it for ordering

          4. Ordering service batches transactions into block employing total order of transactions

          5. Block distributed between peers

          6. Peer conducts validation to attest conformance with endorsement policy for each transaction

          7. After that there is multi value concurrency control (MVCC), which checks for concurrent modifications, in fact validating keys version of RWSet and if concurrent modification detected tx invalidated with status MVCC_READ_CONFLICT


          You can find more details in documentation "Transaction Flow".






          share|improve this answer












          Well, MVCC_READ_CONFLICT means you are doing concurrent modification for some key in two different transactions, hence after transaction being ordered into block, whatever transaction gets in first committed while second one or subsequent transaction which works on same key marked invalid with MVCC_READ_CONFLICT.



          To understand better the reason behind this status it's probably worth noting the transaction flow in fabric:




          1. Client submit transaction proposal for endorsement sending it to endorsing peers

          2. Endorsing peers executes simulation of chaincode where execution results are captured into Read-Write Set

          3. Client collects endorsements and composes transaction, submitting it for ordering

          4. Ordering service batches transactions into block employing total order of transactions

          5. Block distributed between peers

          6. Peer conducts validation to attest conformance with endorsement policy for each transaction

          7. After that there is multi value concurrency control (MVCC), which checks for concurrent modifications, in fact validating keys version of RWSet and if concurrent modification detected tx invalidated with status MVCC_READ_CONFLICT


          You can find more details in documentation "Transaction Flow".







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 7 at 13:28









          Artem Barger

          30.4k94471




          30.4k94471












          • Thank you for answering. There is any way or any idea available to prevent MVCC_READ_CONFLICT. Please give a suggestion.
            – salman faris
            Nov 8 at 4:09


















          • Thank you for answering. There is any way or any idea available to prevent MVCC_READ_CONFLICT. Please give a suggestion.
            – salman faris
            Nov 8 at 4:09
















          Thank you for answering. There is any way or any idea available to prevent MVCC_READ_CONFLICT. Please give a suggestion.
          – salman faris
          Nov 8 at 4:09




          Thank you for answering. There is any way or any idea available to prevent MVCC_READ_CONFLICT. Please give a suggestion.
          – salman faris
          Nov 8 at 4:09


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53189313%2fhyperledger-transaction-become-failed-when-submit-transaction-in-for-loop%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Xamarin.form Move up view when keyboard appear

          Post-Redirect-Get with Spring WebFlux and Thymeleaf

          Anylogic : not able to use stopDelay()