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

feat: avoid frequent write stall #843

Merged
merged 3 commits into from
Apr 17, 2023
Merged

Conversation

ShiKaiWi
Copy link
Member

@ShiKaiWi ShiKaiWi commented Apr 17, 2023

Which issue does this PR close?

Closes #

Rationale for this change

Currently, once the flush is triggered by reaching the mutable_limit (7/8 write buffer size), the next write must be stalled because the flush trigger condition is still valid, and this is unreasonable because the mutable_limit is used to avoid write stall rather than impose write stall.

What changes are included in this PR?

  • For the flush case where the mutable limit is reached, flush won't be triggered if the table is in flushing;
  • Adjust the mutable limit to 5/8, to trigger an earlier flush;

Are there any user-facing changes?

None.

How does this change test

Existing tests.

analytic_engine/src/instance/write.rs Outdated Show resolved Hide resolved
analytic_engine/src/table/data.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@jiacai2050 jiacai2050 left a comment

Choose a reason for hiding this comment

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

LGTM

@ShiKaiWi ShiKaiWi added this pull request to the merge queue Apr 17, 2023
Merged via the queue into apache:main with commit f909e6b Apr 17, 2023
@ShiKaiWi ShiKaiWi deleted the fix-write-stall branch April 17, 2023 09:44
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* feat: avoid frequent write stall

* feat: add option to control mutable limit

* fix: allow preflush_write_buffer_size_ratio to equal 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants