Merge pull request #13907 from ahrtr/kvstore_readtx

Use readTx in (*store).restore
This commit is contained in:
Marek Siarkowicz 2022-04-08 14:14:51 +02:00 committed by GitHub
commit f026a37474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {