use readTx in (*store).restore

This commit is contained in:
ahrtr 2022-04-08 15:45:05 +08:00
parent 76543d06ce
commit a3650db574

View File

@ -330,8 +330,8 @@ func (s *store) restore() error {
keyToLease := make(map[string]lease.LeaseID)
// restore index
tx := s.b.BatchTx()
tx.LockOutsideApply()
tx := s.b.ReadTx()
tx.Lock()
finishedCompact, found := UnsafeReadFinishedCompact(tx)
if found {