Sanity check subversion for log mutations

This commit is contained in:
Meng Xu 2020-03-27 13:07:08 -07:00
parent 32b0ba1822
commit 97f8e46388
6 changed files with 10 additions and 0 deletions

View File

@ -723,6 +723,7 @@ void _parseSerializedMutation(std::map<LoadingParam, VersionedMutationsMap>::ite
auto it = kvOps.insert(std::make_pair(LogMessageVersion(commitVersion, sub++), MutationsVec()));
ASSERT(it.second); // inserted is true
ASSERT(sub < std::numeric_limits<int32_t>::max()); // range file mutation uses int32_max as subversion
it.first->second.push_back_deep(it.first->second.arena(), mutation);
// Sampling (FASTRESTORE_SAMPLING_PERCENT%) data

View File

@ -204,9 +204,13 @@ ACTOR Future<Void> startProcessRestoreRequests(Reference<RestoreMasterData> self
} catch (Error& e) {
if (restoreIndex < restoreRequests.size()) {
TraceEvent(SevError, "FastRestoreMasterProcessRestoreRequestsFailed", self->id())
.detail("Error", e.what())
.detail("ErrorCode", e.code())
.detail("RestoreRequest", restoreRequests[restoreIndex].toString());
} else {
TraceEvent(SevError, "FastRestoreMasterProcessRestoreRequestsFailed", self->id())
.detail("Error", e.what())
.detail("ErrorCode", e.code())
.detail("RestoreRequests", restoreRequests.size())
.detail("RestoreIndex", restoreIndex);
}

View File

@ -26,4 +26,5 @@ startAfter=10.0
restoreAfter=50.0
clearAfterTest=false
simBackupAgents=BackupToFile
; This test file uses old restore, which does not work on new backup format
usePartitionedLogs=false

View File

@ -25,6 +25,8 @@ testTitle=BackupAndParallelRestoreWithAtomicOp
clearAfterTest=false
simBackupAgents=BackupToFile
backupRangesCount=-1
; use new backup
usePartitionedLogs=true
testName=RandomClogging
testDuration=90.0

View File

@ -21,6 +21,7 @@ testTitle=BackupAndRestore
simBackupAgents=BackupToFile
; backupRangesCount<0 means backup the entire normal keyspace
backupRangesCount=-1
usePartitionedLogs=true
testName=RandomClogging
testDuration=90.0

View File

@ -44,6 +44,7 @@ testTitle=BackupAndRestore
simBackupAgents=BackupToFile
; backupRangesCount<0 means backup the entire normal keyspace
backupRangesCount=-1
usePartitionedLogs=true
testName=RandomClogging
testDuration=90.0