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: background compaction #23

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

jdockerty
Copy link
Owner

@jdockerty jdockerty commented Apr 23, 2024

Moves the compaction process from being in the hot path of writes, both set and remove, to a background task on which a compaction notification is received and the job started.

A new active log file is created before the compaction notification is sent, so that writes continue to flow.

@jdockerty jdockerty self-assigned this Apr 23, 2024
@jdockerty jdockerty force-pushed the feat/background-compaction branch from ecf190f to 0ccfd64 Compare April 23, 2024 20:51
The atomic is not required because the writer is behind a RwLock, so the value is always safe to utilise anyway. The extra abstraction of an atomic is not necessary
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.

1 participant