Optimization in backup snapshot dispatching. If the next dispatch version is not ahead of the recently known current version then do not set a scheduled time for new range tasks in order to avoid the overhead and delay of task timeout handling. Adjusted task timeout knobs to avoid large transaction warnings. Removed backtrace() from LargeTransaction trace event. Tweaked suppression in backup trace events.
This commit is contained in:
parent
19ed388c0e
commit
4dec5423f7
|
@ -1426,7 +1426,7 @@ namespace fileBackup {
|
|||
TraceEvent("FileBackupSnapshotDispatchAddingTasks")
|
||||
.detail("TasksToAdd", rangesToAdd.size())
|
||||
.detail("NewBatchSize", newBatchSize)
|
||||
.suppressFor(60, true);
|
||||
.suppressFor(2, true);
|
||||
|
||||
tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
|
||||
tr->setOption(FDBTransactionOptions::LOCK_AWARE);
|
||||
|
@ -1483,17 +1483,20 @@ namespace fileBackup {
|
|||
config.snapshotRangeDispatchMap().set(tr, range.end, false);
|
||||
}
|
||||
|
||||
// Choose a random version between now and the next dispatch version at which to start this range task
|
||||
Version randomVersion = recentReadVersion + g_random->random01() * (nextDispatchVersion - recentReadVersion);
|
||||
addTaskFutures.push_back(success(BackupRangeTaskFunc::addTask(tr, taskBucket, task, range.begin, range.end, TaskCompletionKey::joinWith(snapshotBatchFuture), Reference<TaskFuture>(), 0, randomVersion)));
|
||||
Version scheduledVersion = invalidVersion;
|
||||
// If the next dispatch version is in the future, choose a random version at which to start the new task.
|
||||
if(nextDispatchVersion > recentReadVersion)
|
||||
scheduledVersion = recentReadVersion + g_random->random01() * (nextDispatchVersion - recentReadVersion);
|
||||
|
||||
addTaskFutures.push_back(success(BackupRangeTaskFunc::addTask(tr, taskBucket, task, range.begin, range.end, TaskCompletionKey::joinWith(snapshotBatchFuture), Reference<TaskFuture>(), 0, scheduledVersion)));
|
||||
|
||||
TraceEvent("FileBackupSnapshotRangeDispatched")
|
||||
.detail("BackupUID", config.getUid())
|
||||
.detail("CurrentVersion", recentReadVersion)
|
||||
.detail("ScheduledVersion", randomVersion)
|
||||
.detail("ScheduledVersion", scheduledVersion)
|
||||
.detail("BeginKey", range.begin.printable())
|
||||
.detail("EndKey", range.end.printable())
|
||||
.suppressFor(60, true);
|
||||
.suppressFor(2, true);
|
||||
}
|
||||
else {
|
||||
// This shouldn't happen because if the transaction was already done or if another execution
|
||||
|
|
|
@ -82,13 +82,13 @@ ClientKnobs::ClientKnobs(bool randomize) {
|
|||
|
||||
// TaskBucket
|
||||
init( TASKBUCKET_MAX_PRIORITY, 1 );
|
||||
init( TASKBUCKET_CHECK_TIMEOUT_CHANCE, 0.01 ); if( randomize && BUGGIFY ) TASKBUCKET_CHECK_TIMEOUT_CHANCE = 1.0;
|
||||
init( TASKBUCKET_CHECK_TIMEOUT_CHANCE, 0.02 ); if( randomize && BUGGIFY ) TASKBUCKET_CHECK_TIMEOUT_CHANCE = 1.0;
|
||||
init( TASKBUCKET_TIMEOUT_JITTER_OFFSET, 0.9 );
|
||||
init( TASKBUCKET_TIMEOUT_JITTER_RANGE, 0.2 );
|
||||
init( TASKBUCKET_CHECK_ACTIVE_DELAY, 0.5 );
|
||||
init( TASKBUCKET_CHECK_ACTIVE_AMOUNT, 10 );
|
||||
init( TASKBUCKET_TIMEOUT_VERSIONS, 60*CORE_VERSIONSPERSECOND ); if( randomize && BUGGIFY ) TASKBUCKET_TIMEOUT_VERSIONS = 30*CORE_VERSIONSPERSECOND;
|
||||
init( TASKBUCKET_MAX_TASK_KEYS, 10000 ); if( randomize && BUGGIFY ) TASKBUCKET_MAX_TASK_KEYS = 20;
|
||||
init( TASKBUCKET_MAX_TASK_KEYS, 1000 ); if( randomize && BUGGIFY ) TASKBUCKET_MAX_TASK_KEYS = 20;
|
||||
|
||||
//Backup
|
||||
init( BACKUP_SIMULATED_LIMIT_BYTES, 1e6 ); if( randomize && BUGGIFY ) BACKUP_SIMULATED_LIMIT_BYTES = 1000;
|
||||
|
|
|
@ -2444,7 +2444,6 @@ Future<Void> Transaction::commitMutations() {
|
|||
.detail("NumMutations", tr.transaction.mutations.size())
|
||||
.detail("readConflictSize", tr.transaction.read_conflict_ranges.expectedSize())
|
||||
.detail("writeConflictSize", tr.transaction.write_conflict_ranges.expectedSize())
|
||||
.backtrace()
|
||||
.suppressFor(1.0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue