Skip to content

Commit

Permalink
add test to ensure the rollback locks cannot be read
Browse files Browse the repository at this point in the history
Signed-off-by: you06 <[email protected]>
  • Loading branch information
you06 committed Mar 18, 2024
1 parent d5197cf commit 5b41fdf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integration_tests/pipelined_memdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ func (s *testPipelinedMemDBSuite) TestPipelinedRollback() {
s.Nil(err)
return len(storageBufferedValues) == 0
}, 10*time.Second, 10*time.Millisecond, "rollback should cleanup locks in time")
txn, err = s.store.Begin()
s.Nil(err)
defer func() { s.Nil(txn.Rollback()) }()
storageValues, err := txn.GetSnapshot().BatchGet(context.Background(), keys)
s.Nil(err)
s.Len(storageValues, 0)
}

func (s *testPipelinedMemDBSuite) TestPipelinedPrefetch() {
Expand Down

0 comments on commit 5b41fdf

Please sign in to comment.