Skip to content

Commit

Permalink
Merge pull request #10975 from lzhfromustc/currentRev
Browse files Browse the repository at this point in the history
Add critical section to protect s.currentRev
  • Loading branch information
jingyih committed Sep 6, 2019
2 parents 64b3e59 + 077dd74 commit 88d998b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mvcc/kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func (s *store) compactBarrier(ctx context.Context, ch chan struct{}) {
}

func (s *store) Hash() (hash uint32, revision int64, err error) {
// TODO: hash and revision could be inconsistent, one possible fix is to add s.revMu.RLock() at the beginning of function, which is costly
start := time.Now()

s.b.ForceCommit()
Expand Down

0 comments on commit 88d998b

Please sign in to comment.