Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Internal] Replica Validation: Refactors Code to Address Follow Ups #3929
[Internal] Replica Validation: Refactors Code to Address Follow Ups #3929
Changes from all commits
946bc4a
ad5f6f0
b813526
fb3d4df
08bc68a
4980a87
8d94c21
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Healthy or unhealthy is not defined and might be interpreted many ways.
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.
Just mentioning upgrades in not right?
General verbatim would be ideal or for now exclude it.
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.
Ack. Taken a note on this. I will remove this from the original PR.
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.
Did JAVA have it by-default? or public API?
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.
JAVA has it by the environment variables. I think it's enabled by default. Cc: @xinlian12
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.
yes it is controlled by environment variable, and it is enabled by default.
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.
What is 40 minutes? Why not leverage the incoming cancelaltion token
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 are leveraging the incoming cancellation token. The way it is done is, we add a
Task.Delay(40mins, cancellationToken)
and wait for the cancellation token to expire. The 40 mins here is just a place holder number to define the max wait time for opening up the connections. This can be polished later.See this example for more detail around the approach.
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.
Incoming cancellation can be non-existent, so we need the LinkedTokenSource to guard against the process taking more than some expected time through a Task.Delay. The correct way to cooperate with a Task.Delay is what Deb is doing, through the linkedTokenSource
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.
If the incoming token cancels before, then it will cancel also the linked one, which cancels all Tasks. The linked token is also used to cancel the Task.Delay if the warmup finishes before, which is the expected scenario. Otherwise the Task.Delay keeps running in the back.