Exclude StackableDB from transaction stress tests (#4132)
Summary: The transactions are currently tested with and without using StackableDB. This is mostly to check that the code path is consistent with stackable db as well. Slow, stress tests however do not benefit from being run again with StackableDB. The patch excludes StackableDB from such tests. On a single core it reduced the runtime of transaction_test from 199s to 135s. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4132 Differential Revision: D8841655 Pulled By: maysamyabandeh fbshipit-source-id: 7b9aaba2673b542b195439dfb306cef26bd63b19
This commit is contained in:
parent
e3eba52a5d
commit
537a233941
2
Makefile
2
Makefile
|
@ -813,7 +813,7 @@ check_0:
|
||||||
| grep -E '$(tests-regexp)' \
|
| grep -E '$(tests-regexp)' \
|
||||||
| build_tools/gnu_parallel -j$(J) --plain --joblog=LOG $$eta --gnu '{} >& t/log-{/}'
|
| build_tools/gnu_parallel -j$(J) --plain --joblog=LOG $$eta --gnu '{} >& t/log-{/}'
|
||||||
|
|
||||||
valgrind-blacklist-regexp = InlineSkipTest.ConcurrentInsert|TransactionTest.DeadlockStress|DBCompactionTest.SuggestCompactRangeNoTwoLevel0Compactions|BackupableDBTest.RateLimiting|DBTest.CloseSpeedup|DBTest.ThreadStatusFlush|DBTest.RateLimitingTest|DBTest.EncodeDecompressedBlockSizeTest|FaultInjectionTest.UninstalledCompaction|HarnessTest.Randomized|ExternalSSTFileTest.CompactDuringAddFileRandom|ExternalSSTFileTest.IngestFileWithGlobalSeqnoRandomized|MySQLStyleTransactionTest.TransactionStressTest
|
valgrind-blacklist-regexp = InlineSkipTest.ConcurrentInsert|TransactionStressTest.DeadlockStress|DBCompactionTest.SuggestCompactRangeNoTwoLevel0Compactions|BackupableDBTest.RateLimiting|DBTest.CloseSpeedup|DBTest.ThreadStatusFlush|DBTest.RateLimitingTest|DBTest.EncodeDecompressedBlockSizeTest|FaultInjectionTest.UninstalledCompaction|HarnessTest.Randomized|ExternalSSTFileTest.CompactDuringAddFileRandom|ExternalSSTFileTest.IngestFileWithGlobalSeqnoRandomized|MySQLStyleTransactionTest.TransactionStressTest
|
||||||
|
|
||||||
.PHONY: valgrind_check_0
|
.PHONY: valgrind_check_0
|
||||||
valgrind_check_0:
|
valgrind_check_0:
|
||||||
|
|
|
@ -139,7 +139,7 @@ class PessimisticTransactionDB : public TransactionDB {
|
||||||
friend class TransactionTest_DoubleEmptyWrite_Test;
|
friend class TransactionTest_DoubleEmptyWrite_Test;
|
||||||
friend class TransactionTest_DuplicateKeys_Test;
|
friend class TransactionTest_DuplicateKeys_Test;
|
||||||
friend class TransactionTest_PersistentTwoPhaseTransactionTest_Test;
|
friend class TransactionTest_PersistentTwoPhaseTransactionTest_Test;
|
||||||
friend class TransactionTest_TwoPhaseLongPrepareTest_Test;
|
friend class TransactionStressTest_TwoPhaseLongPrepareTest_Test;
|
||||||
friend class TransactionTest_TwoPhaseDoubleRecoveryTest_Test;
|
friend class TransactionTest_TwoPhaseDoubleRecoveryTest_Test;
|
||||||
friend class TransactionTest_TwoPhaseOutOfOrderDelete_Test;
|
friend class TransactionTest_TwoPhaseOutOfOrderDelete_Test;
|
||||||
friend class WriteUnpreparedTransactionTest_RecoveryRollbackUnprepared_Test;
|
friend class WriteUnpreparedTransactionTest_RecoveryRollbackUnprepared_Test;
|
||||||
|
|
|
@ -48,6 +48,14 @@ INSTANTIATE_TEST_CASE_P(
|
||||||
std::make_tuple(false, true, WRITE_PREPARED),
|
std::make_tuple(false, true, WRITE_PREPARED),
|
||||||
std::make_tuple(false, false, WRITE_UNPREPARED),
|
std::make_tuple(false, false, WRITE_UNPREPARED),
|
||||||
std::make_tuple(false, true, WRITE_UNPREPARED)));
|
std::make_tuple(false, true, WRITE_UNPREPARED)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
DBAsBaseDB, TransactionStressTest,
|
||||||
|
::testing::Values(std::make_tuple(false, false, WRITE_COMMITTED),
|
||||||
|
std::make_tuple(false, true, WRITE_COMMITTED),
|
||||||
|
std::make_tuple(false, false, WRITE_PREPARED),
|
||||||
|
std::make_tuple(false, true, WRITE_PREPARED),
|
||||||
|
std::make_tuple(false, false, WRITE_UNPREPARED),
|
||||||
|
std::make_tuple(false, true, WRITE_UNPREPARED)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
StackableDBAsBaseDB, TransactionTest,
|
StackableDBAsBaseDB, TransactionTest,
|
||||||
::testing::Values(std::make_tuple(true, true, WRITE_COMMITTED),
|
::testing::Values(std::make_tuple(true, true, WRITE_COMMITTED),
|
||||||
|
@ -60,16 +68,10 @@ INSTANTIATE_TEST_CASE_P(
|
||||||
MySQLStyleTransactionTest, MySQLStyleTransactionTest,
|
MySQLStyleTransactionTest, MySQLStyleTransactionTest,
|
||||||
::testing::Values(std::make_tuple(false, false, WRITE_COMMITTED),
|
::testing::Values(std::make_tuple(false, false, WRITE_COMMITTED),
|
||||||
std::make_tuple(false, true, WRITE_COMMITTED),
|
std::make_tuple(false, true, WRITE_COMMITTED),
|
||||||
std::make_tuple(true, false, WRITE_COMMITTED),
|
|
||||||
std::make_tuple(true, true, WRITE_COMMITTED),
|
|
||||||
std::make_tuple(false, false, WRITE_PREPARED),
|
std::make_tuple(false, false, WRITE_PREPARED),
|
||||||
std::make_tuple(false, true, WRITE_PREPARED),
|
std::make_tuple(false, true, WRITE_PREPARED),
|
||||||
std::make_tuple(true, false, WRITE_PREPARED),
|
|
||||||
std::make_tuple(true, true, WRITE_PREPARED),
|
|
||||||
std::make_tuple(false, false, WRITE_UNPREPARED),
|
std::make_tuple(false, false, WRITE_UNPREPARED),
|
||||||
std::make_tuple(false, true, WRITE_UNPREPARED),
|
std::make_tuple(false, true, WRITE_UNPREPARED)));
|
||||||
std::make_tuple(true, false, WRITE_UNPREPARED),
|
|
||||||
std::make_tuple(true, true, WRITE_UNPREPARED)));
|
|
||||||
#endif // ROCKSDB_VALGRIND_RUN
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
TEST_P(TransactionTest, DoubleEmptyWrite) {
|
TEST_P(TransactionTest, DoubleEmptyWrite) {
|
||||||
|
@ -604,7 +606,7 @@ TEST_P(TransactionTest, DeadlockCycleShared) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(TransactionTest, DeadlockCycle) {
|
TEST_P(TransactionStressTest, DeadlockCycle) {
|
||||||
WriteOptions write_options;
|
WriteOptions write_options;
|
||||||
ReadOptions read_options;
|
ReadOptions read_options;
|
||||||
TransactionOptions txn_options;
|
TransactionOptions txn_options;
|
||||||
|
@ -712,7 +714,7 @@ TEST_P(TransactionTest, DeadlockCycle) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(TransactionTest, DeadlockStress) {
|
TEST_P(TransactionStressTest, DeadlockStress) {
|
||||||
const uint32_t NUM_TXN_THREADS = 10;
|
const uint32_t NUM_TXN_THREADS = 10;
|
||||||
const uint32_t NUM_KEYS = 100;
|
const uint32_t NUM_KEYS = 100;
|
||||||
const uint32_t NUM_ITERS = 10000;
|
const uint32_t NUM_ITERS = 10000;
|
||||||
|
@ -1094,7 +1096,7 @@ TEST_P(TransactionTest, TwoPhaseEmptyWriteTest) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(TransactionTest, TwoPhaseExpirationTest) {
|
TEST_P(TransactionStressTest, TwoPhaseExpirationTest) {
|
||||||
Status s;
|
Status s;
|
||||||
|
|
||||||
WriteOptions write_options;
|
WriteOptions write_options;
|
||||||
|
@ -1413,7 +1415,7 @@ TEST_P(TransactionTest, DISABLED_TwoPhaseMultiThreadTest) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(TransactionTest, TwoPhaseLongPrepareTest) {
|
TEST_P(TransactionStressTest, TwoPhaseLongPrepareTest) {
|
||||||
WriteOptions write_options;
|
WriteOptions write_options;
|
||||||
write_options.sync = true;
|
write_options.sync = true;
|
||||||
write_options.disableWAL = false;
|
write_options.disableWAL = false;
|
||||||
|
@ -4790,7 +4792,7 @@ TEST_P(TransactionTest, ToggleAutoCompactionTest) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(TransactionTest, ExpiredTransactionDataRace1) {
|
TEST_P(TransactionStressTest, ExpiredTransactionDataRace1) {
|
||||||
// In this test, txn1 should succeed committing,
|
// In this test, txn1 should succeed committing,
|
||||||
// as the callback is called after txn1 starts committing.
|
// as the callback is called after txn1 starts committing.
|
||||||
rocksdb::SyncPoint::GetInstance()->LoadDependency(
|
rocksdb::SyncPoint::GetInstance()->LoadDependency(
|
||||||
|
@ -4959,7 +4961,7 @@ TEST_P(TransactionTest, MemoryLimitTest) {
|
||||||
// algorithm. It could detect mistakes in updating the code but it is not
|
// algorithm. It could detect mistakes in updating the code but it is not
|
||||||
// necessarily the one acceptable way. If the algorithm is legitimately changed,
|
// necessarily the one acceptable way. If the algorithm is legitimately changed,
|
||||||
// this unit test should be updated as well.
|
// this unit test should be updated as well.
|
||||||
TEST_P(TransactionTest, SeqAdvanceTest) {
|
TEST_P(TransactionStressTest, SeqAdvanceTest) {
|
||||||
// TODO(myabandeh): must be test with false before new releases
|
// TODO(myabandeh): must be test with false before new releases
|
||||||
const bool short_test = true;
|
const bool short_test = true;
|
||||||
WriteOptions wopts;
|
WriteOptions wopts;
|
||||||
|
|
|
@ -449,6 +449,8 @@ class TransactionTest : public TransactionTestBase,
|
||||||
std::get<2>(GetParam())){};
|
std::get<2>(GetParam())){};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TransactionStressTest : public TransactionTest {};
|
||||||
|
|
||||||
class MySQLStyleTransactionTest : public TransactionTest {};
|
class MySQLStyleTransactionTest : public TransactionTest {};
|
||||||
|
|
||||||
} // namespace rocksdb
|
} // namespace rocksdb
|
||||||
|
|
Loading…
Reference in New Issue
Block a user