diff --git a/HISTORY.md b/HISTORY.md index 76434b364d..42a6dce053 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,5 @@ # Speedb Change Log + ## Unreleased Based on RocksDB 8.1.1 @@ -19,6 +20,7 @@ Based on RocksDB 8.1.1 * Sanitize max_num_parallel_flushes in WBM if 0 (#460) * WriteController: fix for stop while shutting down (#499) Also switch to waiting a sec on the CV each time. This is required since a bg error doesn't signal the CV in the WriteController. +* fix UnlockWALStallCleared test in utilities/transactions/transaction_test.cc (#514) ### Miscellaneous * disable failing unit tests and paired bloom filter stress testing diff --git a/utilities/transactions/transaction_test.cc b/utilities/transactions/transaction_test.cc index a538a41332..926a9ebcb5 100644 --- a/utilities/transactions/transaction_test.cc +++ b/utilities/transactions/transaction_test.cc @@ -6641,7 +6641,7 @@ TEST_P(TransactionTest, StallTwoWriteQueues) { } // Make sure UnlockWAL does not return until the stall it controls is cleared. -TEST_P(TransactionTest, DISABLED_UnlockWALStallCleared) { +TEST_P(TransactionTest, UnlockWALStallCleared) { auto dbimpl = static_cast_with_check(db->GetRootDB()); for (bool external_stall : {false, true}) { WriteOptions wopts; @@ -6703,6 +6703,7 @@ TEST_P(TransactionTest, DISABLED_UnlockWALStallCleared) { ASSERT_OK(txn0->Put("k3", "val3")); ASSERT_OK(txn0->Prepare()); // nonmem ASSERT_OK(txn0->Commit()); + t2_completed = true; }}; // Be sure the test is set up appropriately @@ -6711,9 +6712,6 @@ TEST_P(TransactionTest, DISABLED_UnlockWALStallCleared) { ASSERT_FALSE(t1_completed.load()); ASSERT_FALSE(t2_completed.load()); - // Clear the stall - ASSERT_OK(db->UnlockWAL()); - WriteOptions wopts2 = wopts; if (external_stall) { // We did not deadlock in UnlockWAL, so now async clear the external @@ -6731,6 +6729,10 @@ TEST_P(TransactionTest, DISABLED_UnlockWALStallCleared) { // the thread that did BeginWriteStall() can do EndWriteStall() wopts2.no_slowdown = true; } + + // Clear the stall + ASSERT_OK(db->UnlockWAL()); + std::unique_ptr txn0{db->BeginTransaction(wopts2, {})}; ASSERT_OK(txn0->SetName("x2")); ASSERT_OK(txn0->Put("k1", "val4"));