Skip to content

[NBS] Add proper backoff delay for the resync and migration actors #3944

@komarevtsev-d

Description

@komarevtsev-d

No actual delay here:

if (GetErrorKind(msg->GetError()) == EErrorKind::ErrorRetriable) {
// Reschedule range
State.AddPendingResyncRange(rangeId.first);
ScheduleResyncNextRange(ctx);

Same story for the migration actor:

if (HasError(msg->GetError())) {
LOG_WARN(ctx, TBlockStoreComponents::PARTITION,
"[%s] Range migration failed: %s, error: %s",
DiskId.c_str(),
DescribeRange(msg->Range).c_str(),
FormatError(msg->GetError()).c_str());
if (GetErrorKind(msg->GetError()) != EErrorKind::ErrorRetriable) {
OnMigrationNonRetriableError(ctx);
return;
}
// Schedule to retry the migration of the failed range.
const bool inserted = DeferredMigrations.TryInsert(msg->Range);
if (!inserted) {
ReportOverlappingRangesDuringMigrationDetected(
TStringBuilder()
<< "Can't defer a range to migrate later. Range: " << msg->Range
<< ", diskId: " << DiskId);
}
ScheduleRangeMigration(ctx);
return;
}

Metadata

Metadata

Assignees

Labels

blockstoreAdd this label to run only cloud/blockstore build and tests on PR

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions