File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Tutorial/2_TwoPhaseCommit/PSrc Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ machine Coordinator
315
315
*/
316
316
fun DoGlobalCommit () {
317
317
// Record this transaction ID as processed
318
- processedTransactionIds += activeWriteRequest.trans .transId ;
318
+ processedTransactionIds += ( activeWriteRequest.trans.transId ) ;
319
319
320
320
// Instruct all participants to permanently commit the transaction
321
321
BroadcastToAllParticipants (eCommitTrans , activeWriteRequest.trans.transId );
Original file line number Diff line number Diff line change @@ -77,8 +77,7 @@ machine Participant {
77
77
transactionId , pendingTransactions );
78
78
79
79
// Apply the transaction to the key-value store (make it permanent)
80
- var transaction = pendingTransactions [transactionId ];
81
- keyValueStore [transaction.key] = transaction ;
80
+ keyValueStore [pendingTransactions [transactionId ].key ] = pendingTransactions [transactionId ];
82
81
83
82
// Remove from pending transactions since it's now committed
84
83
pendingTransactions -= (transactionId );
You can’t perform that action at this time.
0 commit comments