Skip to content

Commit

Permalink
session: fix goleak in the sendBatchRequest (pingcap#31991)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei authored Jan 26, 2022
1 parent 93454da commit b83dc00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion session/pessimistic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,9 @@ func (s *testPessimisticSuite) TestKillStopTTLManager(c *C) {

// This query should success rather than returning a ResolveLock error.
tk2.MustExec("update test_kill set c = c + 1 where id = 1")

succ = atomic.CompareAndSwapUint32(&sessVars.Killed, 1, 0)
c.Assert(succ, IsTrue)
tk.MustExec("rollback")
tk2.MustExec("rollback")
}

Expand Down

0 comments on commit b83dc00

Please sign in to comment.