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

Extend WAL and segment file names from 8 to 16 characters #496

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

kjnilsson
Copy link
Contributor

In order to avoid running out of characters after a few years of consistent usage.

The renames happens when the WAL and segment writer initialises respectively. The segment writer writes a marker after a successful upgrade in order to avoid listing files in all server directories every time. The WAL always checks the current set of wal files which should be ok given there is rarely more than one.

Fixes: #495

@kjnilsson kjnilsson force-pushed the extend-wal-segment-file-names branch from dad2457 to 6f73dfe Compare January 3, 2025 15:11
@kjnilsson kjnilsson marked this pull request as ready for review January 3, 2025 15:14
In order to avoid running out of characters after a few years of
consistent usage.

The renames happens when the WAL and segment writer initialises
respectively. The segment writer writes a marker after a successful
upgrade in order to avoid listing files in all server directories
every time. The WAL always checks the current set of wal files which
should be ok given there is rarely more than one.
@kjnilsson kjnilsson force-pushed the extend-wal-segment-file-names branch from 6f73dfe to fe66262 Compare January 3, 2025 15:35
src/ra_log_segment_writer.erl Show resolved Hide resolved
test/ra_log_segment_writer_SUITE.erl Outdated Show resolved Hide resolved
@kjnilsson kjnilsson merged commit 7bfc118 into main Jan 3, 2025
5 checks passed
@michaelklishin michaelklishin deleted the extend-wal-segment-file-names branch January 3, 2025 20:34
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.

Avoid segment file name wrap around.
2 participants