Skip to content

Commit

Permalink
Merge pull request #412 from onflow/fxamacker/update-comment-for-nond…
Browse files Browse the repository at this point in the history
…eterministicfastcommit

Update comment for NondeterministicFastCommit
  • Loading branch information
fxamacker authored May 24, 2024
2 parents 688791c + 393e179 commit b79c29e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,10 @@ func (s *PersistentSlabStorage) FastCommit(numWorkers int) error {
return nil
}

// NondeterministicFastCommit commits changes in nondeterministic order.
// This is used by migration program when ordering isn't required.
// NondeterministicFastCommit commits changed slabs in nondeterministic order.
// Encoded slab data is deterministic (e.g. array and map iteration is deterministic).
// IMPORTANT: This function is used by migration programs when commit order of slabs
// is not required to be deterministic (while preserving deterministic array and map iteration).
func (s *PersistentSlabStorage) NondeterministicFastCommit(numWorkers int) error {
// No changes
if len(s.deltas) == 0 {
Expand Down

0 comments on commit b79c29e

Please sign in to comment.