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
Add Http-service to check bookie sanity state #3630
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 agree that we need this feature.
I have only one comment:
Could we apply some throttling or, better, try to run only one check at a time: if there is an ongoing sanity check, we wait for the current check and return the result ?
48f79f5
to
269d998
Compare
good point. made a change to run max (1) concurrent requests. |
@eolivelli can you PTAL. |
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 have left one minor issue please check my comment.
Then the patch is good to go from my POV.
And we should release this with 4.16.
@hangc0276 FYI
try { | ||
// allow max concurrent request as sanity-test check relatively | ||
// longer time to complete | ||
lock.acquire(); |
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.
Please wait at most for X seconds (5?) and if the semaphore cannot be acquired fail the request. We don't want many requests piling up.
Please also fix formatting
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.
done
@eolivelli Sure |
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.
Overall LGTM.
### Motivation Right now, if Bookie startup or process fails due to various reasons then bookie getState() rest API still gives a successful response even though bookie writes are not going through. Therefore. Bookie should have a REST API to check bookie sanity test and that can be used to check bookie liveliness in k8/helm-chart or to plot bookie health graph. ### Changes Add Bookie REST API to check bookie health to validate bookie liveliness
Motivation
Right now, if Bookie startup or process fails due to various reasons then bookie getState() rest API still gives a successful response even though bookie writes are not going through. Therefore. Bookie should have a REST API to check bookie sanity test and that can be used to check bookie liveliness in k8/helm-chart or to plot bookie health graph.
Changes
Add Bookie REST API to check bookie health to validate bookie liveliness