mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
mvcc: force commit and hash should be atomic for getting hash
This commit is contained in:
@@ -323,10 +323,9 @@ func (s *store) Compact(rev int64) (<-chan struct{}, error) {
|
||||
}
|
||||
|
||||
func (s *store) Hash() (uint32, int64, error) {
|
||||
s.b.ForceCommit()
|
||||
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
s.b.ForceCommit()
|
||||
|
||||
// ignore hash consistent index field for now.
|
||||
// consistent index might be changed due to v2 internal sync, which
|
||||
|
||||
Reference in New Issue
Block a user