We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c2378be + 563713e commit 5f387e6Copy full SHA for 5f387e6
server/mvcc/backend/batch_tx.go
@@ -329,17 +329,16 @@ func (t *batchTxBuffered) CommitAndStop() {
329
}
330
331
func (t *batchTxBuffered) commit(stop bool) {
332
- if t.backend.hooks != nil {
333
- t.backend.hooks.OnPreCommitUnsafe(t)
334
- }
335
-
336
// all read txs must be closed to acquire boltdb commit rwlock
337
t.backend.readTx.Lock()
338
t.unsafeCommit(stop)
339
t.backend.readTx.Unlock()
340
341
342
func (t *batchTxBuffered) unsafeCommit(stop bool) {
+ if t.backend.hooks != nil {
+ t.backend.hooks.OnPreCommitUnsafe(t)
+ }
343
if t.backend.readTx.tx != nil {
344
// wait all store read transactions using the current boltdb tx to finish,
345
// then close the boltdb tx
0 commit comments