Skip to content
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

Merged
merged 12 commits into from
Mar 21, 2019

Conversation

richardartoul
Copy link
Contributor

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.

@richardartoul richardartoul force-pushed the ra/improve-m3db-backpressure branch from 369eb07 to eb01ae8 Compare March 20, 2019 23:08
Copy link
Collaborator

@robskillington robskillington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Haijuncao Haijuncao left a 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

Copy link
Collaborator

@prateek prateek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/dbnode/storage/database.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants