-
Notifications
You must be signed in to change notification settings - Fork 828
add options for boltdb_index_client to avoid dead loop #1471
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
Conversation
8acc8e2
to
b4fd8b8
Compare
It seems that your issue is about accessing Boltdb from more than one process. So I am not clear why a timeout will help. |
@bboreham The first failing is like you said, But what I'm proposed is to solve the next more incoming requests hang issue. Quote from the boltdb description in code for this parameter:
Also Boltdb README says: "To prevent an indefinite wait you can pass a timeout option to the Open() function:". |
So your aim is to fail every request from then on? |
yes. Fast fail looks better than indefinite wait. What do you think? |
b4fd8b8
to
caf4c39
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.
Now I understand the intention, I don't think this value is worth adding as an option - just hard-code it and put a comment explaining the expected outcome.
fair enough. updated. could you plz help review and merge again? |
Signed-off-by: mizeng <[email protected]>
Thanks! |
As part of solution for grafana/loki#685, the purpose is to avoid opening boltdb fall into dead loop.