Skip to content

Commit

Permalink
fix data race (pingcap#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
coocood authored May 15, 2020
1 parent 87baa36 commit abb9ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ func (t *safeTsTracker) End() {
safe = t.minActive - 1
}

if safe > t.safeTs {
if safe > atomic.LoadUint64(&t.safeTs) {
atomic.StoreUint64(&t.safeTs, safe)
}
}

0 comments on commit abb9ad3

Please sign in to comment.