-
Notifications
You must be signed in to change notification settings - Fork 108
Comparing changes
Open a pull request
base repository: rabbitmq/ra
base: v3.0.0
head repository: rabbitmq/ra
compare: v3.0.1
- 9 commits
- 12 files changed
- 1 contributor
Commits on Mar 10, 2026
-
Recover corrupt snapshot indexes file from machine state
The indexes file is intentionally not fsynced, so corruption after a crash is expected. Previously this caused a badmatch crash in find_snapshots during init. Now ra_snapshot carries the machine config and can recover live indexes by reading the snapshot and calling ra_machine:live_indexes/2, the same approach used in complete_accept.
Configuration menu - View commit details
-
Copy full SHA for adf11ab - Browse repository at this point
Copy the full SHA adf11abView commit details -
Fix segment deletion during init after dual WAL flush
When a crash occurs after the segment writer flushes a WAL file to segments but before the WAL file is deleted, recovery replays the same WAL creating segments that overlap with those from the first flush. compact_segrefs correctly handles this by truncating the range of partially overlapping segment refs. However the deletion logic used the -- operator which compares full {Filename, Range} tuples. A segment whose range was truncated (but not removed) no longer matched its original ref, so it appeared in the diff and was deleted even though the reader still referenced it. The subsequent fold during state machine recovery then crashed with ra_log_failed_to_open_segment enoent. Compare by filename only when deciding which segments to delete, so that segments still referenced by the reader (even with a truncated range) are preserved.Configuration menu - View commit details
-
Copy full SHA for 2364616 - Browse repository at this point
Copy the full SHA 2364616View commit details -
Send RPCs to snapshot_backoff peers when leader enforces leadership
When a leader receives a pre_vote_rpc from a follower with a stale term, make_all_rpcs now includes peers in snapshot_backoff status alongside normal peers. This ensures the lagging follower that triggered the pre-vote gets its snapshot expeditiously rather than waiting for the backoff timer to fire. The pending backoff timer is cancelled via a new cancel_snapshot_retry_timer effect before the RPC is sent.
Configuration menu - View commit details
-
Copy full SHA for e1256f8 - Browse repository at this point
Copy the full SHA e1256f8View commit details -
Fix WAL recovery crash when segment writer deletes mem table entries …
…concurrently During multi-file WAL recovery after a power-off, the segment writer processes mem tables from earlier WAL files asynchronously. When servers have no Pid (normal during recovery), the segment writer deletes entries directly from the mem table ETS. If this deletion races with recovery of the next WAL file, recover_entry calls mem_table_please which re-scans the (now partially depleted) ETS table. The resulting ra_mt state has a LastSeq that no longer matches the PrevIdx tracked in the writers map, causing ra_mt:insert_sparse to return {error, gap_detected} — an unhandled case_clause in recover_entry that crashes the node at boot. Fix by carrying the Tables map across WAL files in the recovery fold, alongside the already-carried Writers map. This way recover_entry reuses the ra_mt state it built during earlier file recovery rather than re-scanning a potentially mutated ETS table. Made-with: CursorConfiguration menu - View commit details
-
Copy full SHA for 9aa04f1 - Browse repository at this point
Copy the full SHA 9aa04f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 500435b - Browse repository at this point
Copy the full SHA 500435bView commit details
Commits on Mar 11, 2026
-
Sync parent directory after creating config file.
Else it may fail to boot. Ignore for windows.
Configuration menu - View commit details
-
Copy full SHA for 86e6e2b - Browse repository at this point
Copy the full SHA 86e6e2bView commit details -
Change registration vs log init order for new servers.
New servers should register _after_ log initialisation to ensure the config file is fully written as it is required for successful recovery
Configuration menu - View commit details
-
Copy full SHA for 3ec78e4 - Browse repository at this point
Copy the full SHA 3ec78e4View commit details -
Merge pull request #589 from rabbitmq/recover-indexes
Improve crash recovery resilience
Configuration menu - View commit details
-
Copy full SHA for d674387 - Browse repository at this point
Copy the full SHA d674387View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5179304 - Browse repository at this point
Copy the full SHA 5179304View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.0.0...v3.0.1