Make xxhash checksum the default for TLog

Update downgrade tests to use the xxhash.
This commit is contained in:
Jingyu Zhou 2024-09-17 12:43:15 -07:00
parent 43dd7595c5
commit 80ca71833b
13 changed files with 18 additions and 16 deletions

View File

@ -1033,10 +1033,10 @@ struct TLogVersion {
V5 = 5, // 6.3
V6 = 6, // 7.0
V7 = 7, // 7.2
MIN_SUPPORTED = V2,
MIN_SUPPORTED = V5,
MAX_SUPPORTED = V7,
MIN_RECRUITABLE = V6,
DEFAULT = V6,
DEFAULT = V7,
} version;
TLogVersion() : version(UNSET) {}
@ -1744,7 +1744,7 @@ struct ReadOptions {
ReadType type = ReadType::NORMAL,
CacheResult cache = CacheResult::True,
Optional<Version> version = Optional<Version>())
: type(type), cacheResult(cache), debugID(debugID), consistencyCheckStartVersion(version){};
: type(type), cacheResult(cache), debugID(debugID), consistencyCheckStartVersion(version) {}
ReadOptions(ReadType type, CacheResult cache = CacheResult::True) : ReadOptions({}, type, cache) {}

View File

@ -1080,8 +1080,8 @@ IKeyValueStore* keyValueStoreMemory(std::string const& basename,
.detail("MemoryLimit", memoryLimit)
.detail("StoreType", storeType);
// SOMEDAY: update to use DiskQueueVersion::V2 with xxhash3 checksum for FDB >= 7.2
IDiskQueue* log = openDiskQueue(basename, ext, logID, DiskQueueVersion::V1);
// Use DiskQueueVersion::V2 with xxhash3 checksum
IDiskQueue* log = openDiskQueue(basename, ext, logID, DiskQueueVersion::V2);
if (storeType == KeyValueStoreType::MEMORY_RADIXTREE) {
return new KeyValueStoreMemory<radix_tree>(
log, Reference<AsyncVar<ServerDBInfo> const>(), logID, memoryLimit, storeType, false, false, false, false);

View File

@ -97,7 +97,7 @@ ACTOR Future<Void> getTLogCreateActor(Reference<TLogTestContext> pTLogTestContex
std::to_string(pTLogTestContext->epoch) + ".";
state std::string diskQueueFilename = tLogOptions.dataFolder + "/" + diskQueueBasename;
pTLogContext->persistentQueue =
openDiskQueue(diskQueueFilename, tLogOptions.diskQueueExtension, pTLogContext->tLogID, DiskQueueVersion::V1);
openDiskQueue(diskQueueFilename, tLogOptions.diskQueueExtension, pTLogContext->tLogID, DiskQueueVersion::V2);
state std::string kvStoreFilename = tLogOptions.dataFolder + "/" + tLogOptions.kvStoreFilename + "." +
pTLogContext->tLogID.toString() + "." +

View File

@ -465,8 +465,10 @@ struct TLogOptions {
}
DiskQueueVersion getDiskQueueVersion() const {
if (version < TLogVersion::V3)
if (version < TLogVersion::V3) {
ASSERT(false); // no longer supported
return DiskQueueVersion::V0;
}
if (version < TLogVersion::V7)
return DiskQueueVersion::V1;
return DiskQueueVersion::V2;

View File

@ -1,6 +1,6 @@
[configuration]
extraMachineCountDC = 2
maxTLogVersion=6
maxTLogVersion=7
disableHostname=true
tenantModes = ['disabled']

View File

@ -1,5 +1,5 @@
[configuration]
maxTLogVersion = 6
maxTLogVersion = 7
disableTss = true
disableHostname = true
tenantModes = ['disabled']

View File

@ -1,5 +1,5 @@
[configuration]
maxTLogVersion = 6
maxTLogVersion = 7
disableTss = true
tenantModes = ['disabled']

View File

@ -1,5 +1,5 @@
[configuration]
extraMachineCountDC = 2
extraMachineCountDC = 7
maxTLogVersion=6
disableHostname=true
tenantModes = ['disabled']

View File

@ -1,5 +1,5 @@
[configuration]
maxTLogVersion = 6
maxTLogVersion = 7
disableTss = true
disableHostname = true
tenantModes = ['disabled']

View File

@ -1,5 +1,5 @@
[configuration]
maxTLogVersion = 6
maxTLogVersion = 7
disableTss = true
tenantModes = ['disabled']

View File

@ -1,6 +1,6 @@
[configuration]
extraMachineCountDC = 2
maxTLogVersion=6
maxTLogVersion=7
disableHostname=true
tenantModes=['disabled']

View File

@ -1,5 +1,5 @@
[configuration]
maxTLogVersion = 6
maxTLogVersion = 7
disableTss = true
disableHostname = true

View File

@ -1,5 +1,5 @@
[configuration]
maxTLogVersion = 6
maxTLogVersion = 7
disableTss = true
[[knobs]]