Skip to content

Commit 5bd7ea7

Browse files
authored
feat: add sleep between migration connecting attempts (#4798)
1 parent a86de10 commit 5bd7ea7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/cluster/outgoing_slot_migration.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,11 @@ void OutgoingMigration::SyncFb() {
226226
const absl::Duration passed = absl::Now() - start_time;
227227
// we provide 30 seconds to distribute the config to all nodes to avoid extra errors
228228
// reporting
229-
if (passed >= absl::Milliseconds(30000))
229+
if (passed >= absl::Milliseconds(30000)) {
230230
cntx_.ReportError(GenericError(LastResponseArgs().front().GetString()));
231+
} else {
232+
ThisFiber::SleepFor(500ms); // to prevent too many attempts
233+
}
231234
} else {
232235
cntx_.ReportError(GenericError(LastResponseArgs().front().GetString()));
233236
}

0 commit comments

Comments
 (0)