Skip to content

Advise mmap to cleanup closed segments#108

Merged
timvisee merged 5 commits intomasterfrom
cleanup-closed-segment-memory
Feb 18, 2026
Merged

Advise mmap to cleanup closed segments#108
timvisee merged 5 commits intomasterfrom
cleanup-closed-segment-memory

Conversation

@JojiiOfficial
Copy link
Contributor

No description provided.

@JojiiOfficial JojiiOfficial force-pushed the cleanup-closed-segment-memory branch from ae49df4 to 3c6d51b Compare February 17, 2026 11:51
Comment on lines +1002 to +1007
if until < entry_count {
// If `until` is (much) lower we might retain more to satisfy prefix_truncate
wal.closed_segments.len() >= retain_closed
} else {
wal.closed_segments.len() == retain_closed
}
Copy link
Member

Choose a reason for hiding this comment

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

until is randomized and might be very small. If so, we might retain more segments than configured to satisfy the prefix_truncate above.

This fixes the test by also allowing us to keep more retained segments.

@timvisee timvisee changed the title [Experiment] advise mmap to cleanup closed segments Advise mmap to cleanup closed segments Feb 18, 2026
@timvisee timvisee merged commit c07fb56 into master Feb 18, 2026
4 checks passed
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