@@ -599,7 +599,9 @@ struct StorageServerDisk {
599
599
Version newStorageVersion,
600
600
int64_t& bytesLeft,
601
601
UnlimitedCommitBytes unlimitedCommitBytes,
602
- int64_t& clearRangesLeft);
602
+ int64_t& clearRangesLeft,
603
+ const UID& ssId,
604
+ bool verbose = false);
603
605
void makeVersionDurable(Version version);
604
606
void makeAccumulativeChecksumDurable(const AccumulativeChecksumState& acsState);
605
607
void clearAccumulativeChecksumState(const AccumulativeChecksumState& acsState);
@@ -12988,12 +12990,22 @@ ACTOR Future<Void> updateStorage(StorageServer* data) {
12988
12990
}
12989
12991
}
12990
12992
12993
+ // When unlimitedCommitBytes is set to true, clearRangesLeft will be ignored.
12994
+ // Make sure unlimitedCommitBytes is set to True only when storage engine is sharded rocksdb.
12995
+ ASSERT(data->shardAware || unlimitedCommitBytes == UnlimitedCommitBytes::False);
12996
+
12991
12997
// Write mutations to storage until we reach the desiredVersion or have written too much (bytesleft)
12992
12998
// or until we reach clearRanges limit, in case of rocksdb.
12993
12999
state double beforeStorageUpdates = now();
12994
13000
loop {
12995
- state bool done = data->storage.makeVersionMutationsDurable(
12996
- newOldestVersion, desiredVersion, bytesLeft, unlimitedCommitBytes, clearRangesLeft);
13001
+ state bool done = data->storage.makeVersionMutationsDurable(newOldestVersion,
13002
+ desiredVersion,
13003
+ bytesLeft,
13004
+ unlimitedCommitBytes,
13005
+ clearRangesLeft,
13006
+ data->thisServerID,
13007
+ data->storage.getKeyValueStoreType() ==
13008
+ KeyValueStoreType::SSD_ROCKSDB_V1);
12997
13009
if (data->tenantMap.getLatestVersion() < newOldestVersion) {
12998
13010
data->tenantMap.createNewVersion(newOldestVersion);
12999
13011
}
@@ -13581,10 +13593,21 @@ bool StorageServerDisk::makeVersionMutationsDurable(Version& prevStorageVersion,
13581
13593
Version newStorageVersion,
13582
13594
int64_t& bytesLeft,
13583
13595
UnlimitedCommitBytes unlimitedCommitBytes,
13584
- int64_t& clearRangesLeft) {
13596
+ int64_t& clearRangesLeft,
13597
+ const UID& ssId,
13598
+ bool verbose) {
13585
13599
if (!unlimitedCommitBytes && (bytesLeft <= 0 || clearRangesLeft <= 0))
13586
13600
return true;
13587
13601
13602
+ if (clearRangesLeft <= 0 && verbose) {
13603
+ TraceEvent(SevInfo, "MakeVersionMutationsDurableClearRangesLeftZero", ssId)
13604
+ .suppressFor(5.0)
13605
+ .detail("PrevStorageVersion", prevStorageVersion)
13606
+ .detail("NewStorageVersion", newStorageVersion)
13607
+ .detail("BytesLeft", bytesLeft)
13608
+ .detail("ClearRangesLeft", clearRangesLeft)
13609
+ .detail("UnlimitedCommitBytes", unlimitedCommitBytes);
13610
+ }
13588
13611
// Apply mutations from the mutationLog
13589
13612
auto u = data->getMutationLog().upper_bound(prevStorageVersion);
13590
13613
if (u != data->getMutationLog().end() && u->first <= newStorageVersion) {
0 commit comments