-
Notifications
You must be signed in to change notification settings - Fork 23
fix(sync-server): thread-safe shutdown and error reporting in SyncMapServicer #236
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
base: main
Are you sure you want to change the base?
fix(sync-server): thread-safe shutdown and error reporting in SyncMapServicer #236
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #236 +/- ##
==========================================
- Coverage 94.26% 94.09% -0.17%
==========================================
Files 60 60
Lines 2441 2457 +16
Branches 124 128 +4
==========================================
+ Hits 2301 2312 +11
- Misses 101 104 +3
- Partials 39 41 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…Servicer; remove temporary race condition test files Signed-off-by: sapkota-aayush <[email protected]>
131b637
to
4ed0cf5
Compare
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.
LGTM, i will let @kohlisid who is more closer to the code do a thorough review.
@sapkota-aayush Would you want to test few scenarios with fmea.
Also want to note down the behaviour of the events post the shutdown/restart
In the ideal endgoal for clean shutdown, when we get a shutdown signal we would like to close the server for any new incoming events, let the current events process/drain out, and then shut down the orchestrator and server |
@kohlisid does python gRPC support drain/shutdown mode? |
Hi @kohlisid, Sorry for getting back to this late! Thanks for the detailed testing scenarios. Do you want me to:
This will help me approach it the right way. |
This PR fixes a race condition in the sync server where only the first error from multiple crashing threads was reported, and others were lost.
Now, only the first error triggers shutdown and error reporting; others are ignored after shutdown starts.
Removed temporary test files used for debugging.
Closes #198 (Graceful shutdown of gRPC servers when there are exceptions in the User Code).
I’m still exploring gRPC, so I may be wrong—open to any feedback or suggestions!