Skip to content

commitlog: Don't lock while compressing#4981

Open
kim wants to merge 2 commits intomasterfrom
kim/commitlog/dont-lock-while-compressing
Open

commitlog: Don't lock while compressing#4981
kim wants to merge 2 commits intomasterfrom
kim/commitlog/dont-lock-while-compressing

Conversation

@kim
Copy link
Copy Markdown
Contributor

@kim kim commented May 8, 2026

Commitlog compression is coordinated externally, and it is safe to compress the same segment concurrently. Therefore, we can release the lock before starting the actual compression work, thereby avoiding to interfere with writes.

Also, return an error if the mutable segment is requested to be compressed, instead of panicking.

Commitlog compression is coordinated externally, and it is safe to
compress the same segment concurrently. Therefore, we can release the
lock before starting the actual compression work, thereby avoiding to
interfere with writes.

Also, just ignore the currently active segment instead of panicking.
@kim kim force-pushed the kim/commitlog/dont-lock-while-compressing branch from dd087f0 to 9f401b5 Compare May 8, 2026 11:12
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.

2 participants