Skip to content

Commit

Permalink
WT-6800 Insert one key per transaction to make test_txn24 pass on mac…
Browse files Browse the repository at this point in the history
…OS (#6273)
  • Loading branch information
quchenhao committed Feb 3, 2021
1 parent a64cc4a commit f2ce6b0
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions test/suite/test_txn24.py
Expand Up @@ -72,22 +72,16 @@ def test_snapshot_isolation_and_eviction(self):
session2 = self.setUpSessionOpen(self.conn)
cursor2 = session2.open_cursor(uri)
start_row = int(n_rows/4)
for i in range(0, 120):
session2.begin_transaction('isolation=snapshot')
for j in range(0,1000):
cursor2[start_row] = new_val
start_row += 1
session2.commit_transaction()
for i in range(0, 120000):
cursor2[start_row] = new_val
start_row += 1

session3 = self.setUpSessionOpen(self.conn)
cursor3 = session3.open_cursor(uri)
start_row = int(n_rows/2)
for i in range(0, 120):
session3.begin_transaction('isolation=snapshot')
for j in range(0,1000):
cursor3[start_row] = new_val
start_row += 1
session3.commit_transaction()
for i in range(0, 120000):
cursor3[start_row] = new_val
start_row += 1

# At this point in time, we have made roughly 90% cache dirty. If we are not using
# snaphsots for eviction threads, the cache state will remain like this forever and we may
Expand All @@ -101,12 +95,9 @@ def test_snapshot_isolation_and_eviction(self):
session4 = self.setUpSessionOpen(self.conn)
cursor4 = session4.open_cursor(uri)
start_row = 1
for i in range(0, 120):
session4.begin_transaction('isolation=snapshot')
for j in range(0,1000):
cursor4[start_row] = new_val
start_row += 1
session4.commit_transaction()
for i in range(0, 120000):
cursor4[start_row] = new_val
start_row += 1

# If we have done all operations error free so far, eviction threads have been successful.

Expand Down

0 comments on commit f2ce6b0

Please sign in to comment.