Test SetVersionstampedKey without ryw enabled

This commit is contained in:
Andrew Noyes 2020-05-01 20:58:37 +00:00
parent b3698ac921
commit 7edbbb642e
2 changed files with 5 additions and 0 deletions

View File

@ -1590,6 +1590,7 @@ void ReadYourWritesTransaction::atomicOp( const KeyRef& key, const ValueRef& ope
}
if(operationType == MutationRef::SetVersionstampedKey) {
TEST(options.readYourWritesDisabled); // SetVersionstampedKey without ryw enabled
// this does validation of the key and needs to be performed before the readYourWritesDisabled path
KeyRangeRef range = getVersionstampKeyRange(arena, k, tr.getCachedReadVersion().orDefault(0), getMaxReadKey());
if(!options.readYourWritesDisabled) {

View File

@ -321,7 +321,11 @@ struct VersionStampWorkload : TestWorkload {
versionStampValue = value.withSuffix(LiteralStringRef("\x00\x00\x00\x00"));
}
state bool ryw = deterministicRandom()->coinflip();
loop{
if (!ryw) {
tr.setOption(FDBTransactionOptions::READ_YOUR_WRITES_DISABLE);
}
state bool error = false;
state Error err;
//TraceEvent("VST_CommitBegin").detail("Key", printable(key)).detail("VsKey", printable(versionStampKey)).detail("Clear", printable(range));