Skip to content

Commit

Permalink
*: fix data race in the baseTxnContextProvider.ActivateTxn (#42960) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Aug 18, 2023
1 parent 189e059 commit 5c14437
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sessiontxn/isolation/base.go
Expand Up @@ -266,7 +266,9 @@ func (p *baseTxnContextProvider) ActivateTxn() (kv.Transaction, error) {
}

sessVars := p.sctx.GetSessionVars()
sessVars.TxnCtxMu.Lock()
sessVars.TxnCtx.StartTS = txn.StartTS()
sessVars.TxnCtxMu.Unlock()
if sessVars.MemDBFootprint != nil {
sessVars.MemDBFootprint.Detach()
}
Expand Down

0 comments on commit 5c14437

Please sign in to comment.