Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rabbitmq/ra
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.1.0
Choose a base ref
...
head repository: rabbitmq/ra
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.1.1
Choose a head ref
  • 9 commits
  • 7 files changed
  • 5 contributors

Commits on Mar 23, 2026

  1. Use the Unicode translation modifier to log server IDs and cluster names

    `ra:server_id()`s are currently formatted with `~w` which escapes atom
    characters above the ASCII range. We can add the Unicode translation
    modifier `t` to print the Unicode characters. For example, before:
    
        2026-03-21 12:19:33.235018-04:00 [info] <0.1008.0> queue 'qq-🐇' in vhost '/': granting vote for {'%2F_qq-\x{1F407}','rabbit-1@mango2'} with last {index, term} {0,0} for term 1 previous term was 0
    
    After:
    
        2026-03-21 12:27:43.829863-04:00 [info] <0.1008.0> queue 'qq-🐇' in vhost '/': granting vote for {'%2F_qq-🐇','rabbit-1@mango2'} with last {index, term} {0,0} for term 1 previous term was 0
    the-mikedavis committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    953b69f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #599 from rabbitmq/md/ra_server-log-unicode-transl…

    …ation-modifier
    
    Use the Unicode translation modifier to log server IDs and cluster names
    the-mikedavis authored Mar 23, 2026
    Configuration menu
    Copy the full SHA
    dfbeb60 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2026

  1. Fix doubly-wrapped log entries after sparse write and recovery

    When a follower receives a pre-snapshot chunk, it uses `ra_log:write_sparse/3`
    to write the entries to the WAL. However, `write_sparse/3` was passing the
    entire `log_entry()` tuple `{Idx, Term, Cmd}` as the payload to the WAL,
    instead of just the `Cmd`.
    
    When the node is restarted, the WAL recovery process reads the payload and
    wraps it in a new `{Idx, Term, Payload}` tuple. Because the payload was
    already a full `log_entry()` tuple, the recovered entry became doubly-wrapped:
    `{Idx, Term, {Idx, Term, Cmd}}`.
    
    This caused a `badmatch` error in `rabbit_jms_machine:exec_read/3` when
    `rabbit_jms_queue_client` attempted to read messages for delivery. The
    `ra_server:transform_for_partial_read/3` function failed to strip the Raft
    metadata because the doubly-wrapped entry did not match the expected
    `{'$usr', ...}` pattern, causing raw Raft metadata to be returned instead
    of the expected JMS message.
    
    This commit fixes the issue by passing only the `Cmd` to the WAL in
    `write_sparse/3`, matching the behavior of normal appends. A test case
    has been added to verify that sparse writes survive recovery without
    being doubly-wrapped.
    ansd committed Mar 25, 2026
    Configuration menu
    Copy the full SHA
    e860289 View commit details
    Browse the repository at this point in the history
  2. Do not clear pending if points to the checkpoint

    When a new checkpoint write is in progress and release_cursor fires promote_checkpoint, the pending field gets overwritten, and the subsequent checkpoint completion clobbers the snapshot's pending state.
    deadtrickster authored Mar 25, 2026
    Configuration menu
    Copy the full SHA
    9eb8786 View commit details
    Browse the repository at this point in the history
  3. Export ra:membership() type

    This type can be specified in a `ra_server:config()` so it's useful to
    have it exported.
    the-mikedavis committed Mar 25, 2026
    Configuration menu
    Copy the full SHA
    62d421c View commit details
    Browse the repository at this point in the history
  4. Merge pull request #603 from rabbitmq/export-membership

    Export `ra:membership()` type
    michaelklishin authored Mar 25, 2026
    Configuration menu
    Copy the full SHA
    14097b4 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2026

  1. Merge pull request #602 from deadtrickster/patch-1

    Do not clear pending if points to the checkpoint
    michaelklishin authored Mar 26, 2026
    Configuration menu
    Copy the full SHA
    36233c1 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #601 from rabbitmq/wal-bug

    Fix doubly-wrapped log entries after sparse write and recovery
    michaelklishin authored Mar 26, 2026
    Configuration menu
    Copy the full SHA
    1491506 View commit details
    Browse the repository at this point in the history
  3. 3.1.1

    michaelklishin committed Mar 26, 2026
    Configuration menu
    Copy the full SHA
    934140e View commit details
    Browse the repository at this point in the history
Loading