-
Notifications
You must be signed in to change notification settings - Fork 455
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
Improve M3DBs ability to apply back pressure on writes #1482
Conversation
369eb07
to
eb01ae8
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
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 good, simple yet effective
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
Previously, M3DB would only apply back pressure on writes if it received a commitlog queue full error, but this would only occur after almost all of the most expensive operations have already taken place.
To improve this situation, before performing any write and all the expensive memory operations like writing to in-memory data structures, hash map lookups, pooling and object allocation etc, we'll check the current length of the commit log queue. If its over 90% of its maximum capacity, we'll fail the write early to give the system time to recover.