-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Core] Fix the race condition where grpc requests are handled while core worker not yet initialized #37117
Conversation
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.
I think it'd be the best if we can fix by changing the initialization order as @jjyao said. But if not, I have comments for existing logics;
yes it's from GCS, let me defer that instead. |
huh none of them seems easy. we should process with this. |
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.
Looks great to me!
@@ -196,6 +209,9 @@ class ServerCallImpl : public ServerCall { | |||
} | |||
|
|||
void HandleRequestImpl() { | |||
if constexpr (std::is_base_of_v<DelayedServiceHandler, ServiceHandler>) { |
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.
C++ is amazing
…ore worker not yet initialized (ray-project#37117) Why are these changes needed? there is a race condition where grpc server start handling requests before the core worker is initialized. This PR fixes by waiting for initialization before handling any grpc request.
#37301) * [Core] Fix the race condition where grpc requests are handled while core worker not yet initialized (#37117) Why are these changes needed? there is a race condition where grpc server start handling requests before the core worker is initialized. This PR fixes by waiting for initialization before handling any grpc request. * update
… handled while core worker not yet initialized (ray-project#37117)" (ray-project#37343)" This reverts commit 59a15fc.
… handled while core worker not yet initialized (ray-project#37117)" (ray-project#37343)" This reverts commit 59a15fc.
… while core worker not yet initialized (ray-project#37117)" (ray-project#37343) This reverts commit 5e8fd37.
… handled while core worker not yet initialized (ray-project#37117)" (ray-project#37343)" (ray-project#37495) This reverts commit 59a15fc.
…ore worker not yet initialized (ray-project#37117) Why are these changes needed? there is a race condition where grpc server start handling requests before the core worker is initialized. This PR fixes by waiting for initialization before handling any grpc request. Signed-off-by: NripeshN <nn2012@hw.ac.uk>
… while core worker not yet initialized (ray-project#37117)" (ray-project#37343) This reverts commit 5e8fd37. Signed-off-by: NripeshN <nn2012@hw.ac.uk>
… handled while core worker not yet initialized (ray-project#37117)" (ray-project#37343)" (ray-project#37495) This reverts commit 59a15fc. Signed-off-by: NripeshN <nn2012@hw.ac.uk>
…ore worker not yet initialized (ray-project#37117) Why are these changes needed? there is a race condition where grpc server start handling requests before the core worker is initialized. This PR fixes by waiting for initialization before handling any grpc request. Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
… while core worker not yet initialized (ray-project#37117)" (ray-project#37343) This reverts commit 5e8fd37. Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
… handled while core worker not yet initialized (ray-project#37117)" (ray-project#37343)" (ray-project#37495) This reverts commit 59a15fc. Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
… handled while core worker not yet initialized (ray-project#37117)" (ray-project#37343)" (ray-project#37495) This reverts commit 59a15fc. Signed-off-by: Victor <vctr.y.m@example.com>
Why are these changes needed?
there is a race condition where grpc server start handling requests before the core worker is initialized. This PR fixes by waiting for initialization before handling any grpc request.
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.