Merge pull request #1497 from alexmiller-apple/fastrecovery
Add an \xff keyrange that is backed by the txnStateStore.
This commit is contained in:
commit
b451c2cd56
|
@ -625,3 +625,8 @@ std::pair<Key,Version> decodeHealthyZoneValue( ValueRef const& value) {
|
|||
reader >> version;
|
||||
return std::make_pair(zoneId, version);
|
||||
}
|
||||
|
||||
const KeyRangeRef testOnlyTxnStateStorePrefixRange(
|
||||
LiteralStringRef("\xff/TESTONLYtxnStateStore/"),
|
||||
LiteralStringRef("\xff/TESTONLYtxnStateStore0")
|
||||
);
|
||||
|
|
|
@ -283,4 +283,8 @@ extern const KeyRef healthyZoneKey;
|
|||
const Value healthyZoneValue( StringRef const& zoneId, Version version );
|
||||
std::pair<Key,Version> decodeHealthyZoneValue( ValueRef const& );
|
||||
|
||||
// All mutations done to this range are blindly copied into txnStateStore.
|
||||
// Used to create artifically large txnStateStore instances in testing.
|
||||
extern const KeyRangeRef testOnlyTxnStateStorePrefixRange;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -179,7 +179,7 @@ static void applyMetadataMutations(UID const& dbgid, Arena &arena, VectorRef<Mut
|
|||
}
|
||||
}
|
||||
} else if( m.param1 == databaseLockedKey || m.param1 == metadataVersionKey || m.param1 == mustContainSystemMutationsKey || m.param1.startsWith(applyMutationsBeginRange.begin) ||
|
||||
m.param1.startsWith(applyMutationsAddPrefixRange.begin) || m.param1.startsWith(applyMutationsRemovePrefixRange.begin) || m.param1.startsWith(tagLocalityListPrefix) || m.param1.startsWith(serverTagHistoryPrefix) ) {
|
||||
m.param1.startsWith(applyMutationsAddPrefixRange.begin) || m.param1.startsWith(applyMutationsRemovePrefixRange.begin) || m.param1.startsWith(tagLocalityListPrefix) || m.param1.startsWith(serverTagHistoryPrefix) || m.param1.startsWith(testOnlyTxnStateStorePrefixRange.begin) ) {
|
||||
if(!initialCommit) txnStateStore->set(KeyValueRef(m.param1, m.param2));
|
||||
}
|
||||
else if (m.param1.startsWith(applyMutationsEndRange.begin)) {
|
||||
|
@ -352,6 +352,9 @@ static void applyMetadataMutations(UID const& dbgid, Arena &arena, VectorRef<Mut
|
|||
if (range.contains(mustContainSystemMutationsKey)) {
|
||||
if(!initialCommit) txnStateStore->clear(singleKeyRange(mustContainSystemMutationsKey));
|
||||
}
|
||||
if (range.intersects(testOnlyTxnStateStorePrefixRange)) {
|
||||
if(!initialCommit) txnStateStore->clear(range & testOnlyTxnStateStorePrefixRange);
|
||||
}
|
||||
if(range.intersects(applyMutationsEndRange)) {
|
||||
KeyRangeRef commonEndRange(range & applyMutationsEndRange);
|
||||
if(!initialCommit) txnStateStore->clear(commonEndRange);
|
||||
|
|
|
@ -111,6 +111,7 @@ add_fdb_test(TEST_FILES fast/SwizzledRollbackSideband.txt)
|
|||
add_fdb_test(TEST_FILES fast/SystemRebootTestCycle.txt)
|
||||
add_fdb_test(TEST_FILES fast/TaskBucketCorrectness.txt)
|
||||
add_fdb_test(TEST_FILES fast/TimeKeeperCorrectness.txt)
|
||||
add_fdb_test(TEST_FILES fast/TxnStateStoreCycleTest.txt)
|
||||
add_fdb_test(TEST_FILES fast/Unreadable.txt)
|
||||
add_fdb_test(TEST_FILES fast/VersionStamp.txt)
|
||||
add_fdb_test(TEST_FILES fast/Watches.txt)
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
testTitle=Clogged
|
||||
testName=Cycle
|
||||
transactionsPerSecond=2500.0
|
||||
testDuration=10.0
|
||||
expectedRate=0
|
||||
keyPrefix=\xff/TESTONLYtxnStateStore/
|
||||
|
||||
testName=RandomClogging
|
||||
testDuration=10.0
|
||||
|
||||
testName=Rollback
|
||||
meanDelay=10.0
|
||||
testDuration=10.0
|
||||
|
||||
testName=Attrition
|
||||
machinesToKill=10
|
||||
machinesToLeave=3
|
||||
reboot=true
|
||||
testDuration=10.0
|
||||
|
||||
testName=Attrition
|
||||
machinesToKill=10
|
||||
machinesToLeave=3
|
||||
reboot=true
|
||||
testDuration=10.0
|
||||
|
||||
testTitle=Unclogged
|
||||
testName=Cycle
|
||||
transactionsPerSecond=250.0
|
||||
testDuration=10.0
|
||||
expectedRate=0.80
|
||||
keyPrefix=\xff/TESTONLYtxnStateStore/
|
Loading…
Reference in New Issue