-
Notifications
You must be signed in to change notification settings - Fork 648
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
Kill diskless fork child asap when the last replica drop #1227
base: unstable
Are you sure you want to change the base?
Kill diskless fork child asap when the last replica drop #1227
Conversation
We originally checked the replica connection to whether to kill the diskless child only when rdbPipeReadHandler is triggered. Actually we can check it when the replica is disconnected, so that we don't have to wait for rdbPipeReadHandler to be triggered and can kill the forkless child as soon as possible. In this way, when the child or rdbPipeReadHandler is stuck for some reason, we can kill the child faster and release the fork resources. Signed-off-by: Binbin <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1227 +/- ##
============================================
- Coverage 70.66% 70.66% -0.01%
============================================
Files 114 114
Lines 63143 63144 +1
============================================
- Hits 44623 44620 -3
- Misses 18520 18524 +4
|
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.
@enjoy-binbin generally looks good to me. I think there are no tests checking the logs for 0 replicas left during bgsave. Maybe worth adding a test to read and validate the correct logs are issued in that case?
sorry i forgot to reply. i see we do have a test |
Don't know how I missed it :) good to go |
We originally checked the replica connection to whether to kill the
diskless child only when rdbPipeReadHandler is triggered. Actually
we can check it when the replica is disconnected, so that we don't
have to wait for rdbPipeReadHandler to be triggered and can kill
the forkless child as soon as possible.
In this way, when the child or rdbPipeReadHandler is stuck for some
reason, we can kill the child faster and release the fork resources.