-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add migration_finalization_timeout_ms flag #4301
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,10 @@ | |
#include "server/server_family.h" | ||
#include "util/fibers/synchronization.h" | ||
|
||
ABSL_FLAG(int, slot_migration_connection_timeout_ms, 5000, "Timeout for network operations"); | ||
ABSL_FLAG(int, slot_migration_connection_timeout_ms, 2000, | ||
"Connection creating timeout for migration operations"); | ||
ABSL_FLAG(int, migration_finalization_timeout_ms, 30000, | ||
BorysTheDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"Timeout for migration finalization operation"); | ||
Comment on lines
+24
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a little bit more in the description about what these flags do because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know what else should be added. migration finalization is a several-step algorithm and it needs time There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we can always reiterate on the descriptions so I leave this for you and the rest of team to decide |
||
|
||
using namespace std; | ||
using namespace facade; | ||
|
@@ -333,7 +336,7 @@ bool OutgoingMigration::FinalizeMigration(long attempt) { | |
|
||
const absl::Time start = absl::Now(); | ||
const absl::Duration timeout = | ||
absl::Milliseconds(absl::GetFlag(FLAGS_slot_migration_connection_timeout_ms)); | ||
absl::Milliseconds(absl::GetFlag(FLAGS_migration_finalization_timeout_ms)); | ||
while (true) { | ||
const absl::Time now = absl::Now(); | ||
const absl::Duration passed = now - start; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you synced with @romange about the new flag? I am asking cause we usually discuss before we introduce a new flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have discussed it with @adiholden