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: support memory usage limit on background compaction #476

Merged
merged 3 commits into from
Dec 13, 2022

Conversation

ShiKaiWi
Copy link
Member

Which issue does this PR close?

Closes #

Rationale for this change

Currently, there is no limit on the memory usage by the background compaction task, leading to frequent OOM on the prod environment.

What changes are included in this PR?

  • Add memory usage limit for compaction scheduler, so the task will be skipped and put back to the request queue if the memory threshold is reached.

Are there any user-facing changes?

None.

How does this change test

New unit tests.

@ShiKaiWi ShiKaiWi marked this pull request as ready for review December 12, 2022 09:34
@ShiKaiWi ShiKaiWi force-pushed the feat-memory-limit-for-compaction branch from 1f1a0c9 to f429adc Compare December 12, 2022 13:04
Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

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

LGTM

@Rachelint Rachelint merged commit 93ec1af into apache:main Dec 13, 2022
@ShiKaiWi ShiKaiWi deleted the feat-memory-limit-for-compaction branch January 18, 2023 06:55
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* feat: support memory usage limit on background compaction

* chore: add unit test

* config: add memory limit options for the compaction scheduler
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.

None yet

2 participants