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

WAL: drop entries with indexes lower or equal to the last snapshot #445

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

kjnilsson
Copy link
Contributor

@kjnilsson kjnilsson commented May 24, 2024

In situations where the WAL lags behind but entries are still
committed the WAL will still write entries with indexes lower
than the last snapshot index for a given server. To avoid this
unnessary work we no check the ra_log_snapshot_state table for
each write and do not write them if they are lower than the
snapshot index. This allows the wal a better chance to catch
up on it's backlog.

Some changes needed to be made to the ra_log also to handle
this new behaviour.

@kjnilsson kjnilsson force-pushed the wal-drop-entries-lower-than-snap branch 3 times, most recently from 16d23ce to 4818da8 Compare June 4, 2024 09:50
@kjnilsson kjnilsson changed the title WAL: drop entries for UId that are lower than snapshot index. WAL: drop entries with indexes lower or equal to the last snapshot Jun 4, 2024
@kjnilsson kjnilsson added this to the 2.10.2 milestone Jun 4, 2024
@kjnilsson kjnilsson marked this pull request as ready for review June 4, 2024 10:51
@kjnilsson kjnilsson force-pushed the wal-drop-entries-lower-than-snap branch from 4818da8 to 40cedac Compare June 4, 2024 10:53
In situations where the WAL lags behind but entries are still
committed the WAL will still write entries with indexes lower
than the last snapshot index for a given server. To avoid this
unnessary work we no check the ra_log_snapshot_state table for
each write and do not write them if they are lower than the
snapshot index. This allows the wal a better chance to catch
up on it's backlog.

Some changes needed to be made to the ra_log also to handle
this new behaviour.
@kjnilsson kjnilsson force-pushed the wal-drop-entries-lower-than-snap branch from 40cedac to 5b7a265 Compare June 4, 2024 13:55
@kjnilsson kjnilsson merged commit 82329ec into main Jun 6, 2024
10 checks passed
@the-mikedavis the-mikedavis modified the milestones: 2.10.2, 2.11.0 Jun 12, 2024
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