Skip to content

Commit

Permalink
fix CRDTs using old transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Jun 3, 2024
1 parent c8eaedd commit 14c5967
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/db/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ func (db *db) executeMerge(ctx context.Context, dagMerge events.DAGMerge) error
ctx = SetContextTxn(ctx, txn)
mp.txn = txn
mp.ls.SetReadStorage(txn.DAGstore().AsIPLDStorage())
// Reset the CRDTs to avoid reusing the old transaction.
mp.mCRDTs = make(map[string]merklecrdt.MerkleCRDT)
continue
}
return err
Expand Down

0 comments on commit 14c5967

Please sign in to comment.