Skip to content

Instantly share code, notes, and snippets.

@rahulEth
Last active February 14, 2020 09:02
Show Gist options
  • Save rahulEth/89125925b81215efc9c603431aa043b6 to your computer and use it in GitHub Desktop.
Save rahulEth/89125925b81215efc9c603431aa043b6 to your computer and use it in GitHub Desktop.
Hyperledger Fabric

diffrent scenario where you could get the MVCC_READ_CONFLICT error

1stcase : try to update same key multiple time simultenously in same block.

Result :
endorsement :Successfully sent Proposal and received ProposalResponse: Status - 200, message - ""
commitment : [ { status: 'SUCCESS', info: '' },
              { event_status: 'MVCC_READ_CONFLICT',
               tx_id: 'b00927a980d3be17721beea9a3f0a7adc40530ad0ed235f4cb79fab27dfc5c7d' } ]
 in such case all transaction would be invalid except the last one.
but only first transaction would get
   [ { status: 'SUCCESS', info: '' },
     { event_status: 'VALID',
       tx_id: '125ac6c31020cd000b6152eff21479e0447a1fe3a0d3837a52c50469b1be0fde' } ]
 Note : in ledger only last transaction values would reflect in couchdb all
earlier transaction would be invalid

2ndcase : entering new unique record with different values multiple time in same block.

Result : 1st trnasaction output
[  { status: 'SUCCESS', info: '' },
   { event_status: 'VALID',
   tx_id: '21f7c40ab29e2b778fa96425fa913fa10fde53298ed370a0ad18d8ecdf022479' } ]
all other transactions output would get :
result : [ { status: 'SUCCESS', info: '' },
{ event_status: 'MVCC_READ_CONFLICT',
  tx_id: 'b00927a980d3be17721beea9a3f0a7adc40530ad0ed235f4cb79fab27dfc5c7d' } ]
Note : entry committed on peer successfully but but only values in last transaction reflects in DLT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment