diff --git a/mvcc/kvstore.go b/mvcc/kvstore.go index 7e6c0046b..e03750ad4 100644 --- a/mvcc/kvstore.go +++ b/mvcc/kvstore.go @@ -427,6 +427,7 @@ func (s *store) restore() error { for key, lid := range keyToLease { if s.le == nil { + tx.Unlock() panic("no lessor to attach lease") } err := s.le.Attach(lid, []lease.LeaseItem{{Key: key}}) diff --git a/mvcc/watchable_store.go b/mvcc/watchable_store.go index a51e5aa52..dd11d3f5e 100644 --- a/mvcc/watchable_store.go +++ b/mvcc/watchable_store.go @@ -159,6 +159,7 @@ func (s *watchableStore) cancelWatcher(wa *watcher) { } if !wa.victim { + s.mu.Unlock() panic("watcher not victim but not in watch groups") }