mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
limit tx lock scope
This commit is contained in:
parent
3ef8a2d30a
commit
6d68f7841a
@ -61,9 +61,9 @@ func (s *store) scheduleCompaction(compactMainRev int64, keep map[revision]struc
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tx.Unlock()
|
||||||
// update last
|
// update last
|
||||||
revToBytes(revision{main: rev.main, sub: rev.sub + 1}, last)
|
revToBytes(revision{main: rev.main, sub: rev.sub + 1}, last)
|
||||||
tx.Unlock()
|
|
||||||
// Immediately commit the compaction deletes instead of letting them accumulate in the write buffer
|
// Immediately commit the compaction deletes instead of letting them accumulate in the write buffer
|
||||||
s.b.ForceCommit()
|
s.b.ForceCommit()
|
||||||
dbCompactionPauseMs.Observe(float64(time.Since(start) / time.Millisecond))
|
dbCompactionPauseMs.Observe(float64(time.Since(start) / time.Millisecond))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user