diff --git a/server/concurrent/async_local_client.go b/server/concurrent/async_local_client.go index 7b8dd9c49..6071f24c9 100644 --- a/server/concurrent/async_local_client.go +++ b/server/concurrent/async_local_client.go @@ -380,6 +380,7 @@ func (app *asyncLocalClient) CommitSync() (*types.ResponseCommit, error) { app.commitLock.Lock() // this must come before the wgCommit.Wait() defer app.commitLock.Unlock() app.checkTxMidLock.Unlock() + app.wgCommit.Wait() // wait for all the submitted CheckTx/DeliverTx/Query finish app.rwLock.Lock() defer app.rwLock.Unlock() // only checkTxLock is locked here