diff --git a/etcdserver/api/v2store/store.go b/etcdserver/api/v2store/store.go index cacf7e84ac6..db16b44c511 100644 --- a/etcdserver/api/v2store/store.go +++ b/etcdserver/api/v2store/store.go @@ -755,7 +755,7 @@ func (s *store) SaveNoCopy() ([]byte, error) { } func (s *store) Clone() Store { - s.worldLock.Lock() + s.worldLock.RLock() clonedStore := newStore() clonedStore.CurrentIndex = s.CurrentIndex @@ -764,7 +764,7 @@ func (s *store) Clone() Store { clonedStore.Stats = s.Stats.clone() clonedStore.CurrentVersion = s.CurrentVersion - s.worldLock.Unlock() + s.worldLock.RUnlock() return clonedStore }