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.0.2
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.0
Choose a head ref
  • 14 commits
  • 16 files changed
  • 4 contributors

Commits on Mar 18, 2026

  1. Configuration menu
    Copy the full SHA
    de10170 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    324e057 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8126773 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2026

  1. Merge pull request #594 from rabbitmq/mk-gen-batch-server-0.9.1

    Bump `gen_batch_server` to `0.9.1`
    michaelklishin authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    2ae87e9 View commit details
    Browse the repository at this point in the history
  2. Replace catch with try/catch in handle_leader/2

    The catch expression captured the full exception term including
    the stacktrace, which could contain the entire Ra server state
    in its function arguments. Logging this with ~p caused
    io_lib_pretty to traverse the massive term, triggering extreme
    memory allocation and OOM crashes for servers with large machine
    states (e.g. millions of messages).
    
    In this case the node crashed due to OOM because there was a
    function_clause error in the state machine implementation where the
    state machine had a huge state.
    We still need the stack trace to locate where the function_clause
    originates from.
    ansd committed Mar 19, 2026
    Configuration menu
    Copy the full SHA
    bf799b5 View commit details
    Browse the repository at this point in the history
  3. Fix failing test cases

    ansd committed Mar 19, 2026
    Configuration menu
    Copy the full SHA
    7a27f6a View commit details
    Browse the repository at this point in the history
  4. Merge pull request #596 from rabbitmq/handle_leader

    Replace catch with try/catch in handle_leader/2
    kjnilsson authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    0a99661 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2026

  1. log tweak

    kjnilsson committed Mar 20, 2026
    Configuration menu
    Copy the full SHA
    0341af3 View commit details
    Browse the repository at this point in the history
  2. Fix segment file deletion for limited (range-truncated) segrefs

    update_segments/2 used the `--` operator to compute which new segment
    files should be deleted as overwritten.  `--` performs exact tuple
    matching, so when compact_segrefs/2 *limited* (truncated the end index
    of) a segment rather than removing it entirely, the limited tuple
    {Fn, {Start, NewEnd}} no longer matched the original
    {Fn, {Start, OrigEnd}}.  The original was then incorrectly included
    in OverwrittenSegments, causing the segment file to be deleted while
    a reference to it remained in the segment_refs structure.
    
    This manifested when the segment writer sent a batch containing both
    normal (4096-entry) segments and compacted (wide-range) segments whose
    index ranges overlapped.  compact_segrefs would limit the compacted
    segments, and the `--` operator would flag them as overwritten.  The
    files were deleted, leaving dangling references that caused subsequent
    reads to fail with "did not found all requested indexes".
    
    Replace the `--` approach with a map-based filename lookup: build a
    set of filenames surviving in the compacted result and only flag
    segments whose filename is completely absent — i.e. truly removed,
    not merely limited.
    kjnilsson committed Mar 20, 2026
    Configuration menu
    Copy the full SHA
    f2b3e0c View commit details
    Browse the repository at this point in the history
  3. Merge pull request #597 from rabbitmq/segments-bug-fix

    Fix segment file deletion for limited (range-truncated) segrefs
    kjnilsson authored Mar 20, 2026
    Configuration menu
    Copy the full SHA
    ab12d5c View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2026

  1. ra_snapshot: Track latest snapshot size in bytes in state

    This will be useful to Ra machine implementations to include this value
    in their snaphsot decision.
    
    The snapshot module implementation can now return the size of the
    snapshot from its `write/4` callback with `{ok, SnapshotSize}` where
    `SnapshotSize` is a non-negative integer representing the number of
    bytes of the snapshot.
    
    To maintain backward compatibility, returning the historic `ok` value is
    accepted. In this case, the snapshot size is set to `undefined`.
    
    Likewise, when a snapshot is recovered, a new optional snapshot module
    callback is used, `get_size/1`. If the callback is unimplemented or if
    the callback returns an error, the snapshot size is set to `undefined`.
    
    Note that this commit only adds the tracking, not the query API. This
    will be added in a follow-up commit.
    dumbbell committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    f2305bb View commit details
    Browse the repository at this point in the history
  2. ra_aux: Add latest_snapshot_size/1 to query the latest snapshot size

    This will be useful to Ra machine implementations to include this value
    in their snaphsot decision.
    dumbbell committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    75c647b View commit details
    Browse the repository at this point in the history
  3. Merge pull request #598 from rabbitmq/track-latest-snapshot-size

    ra_snapshot: Track latest snapshot size in bytes in state
    kjnilsson authored Mar 23, 2026
    Configuration menu
    Copy the full SHA
    ed96cc8 View commit details
    Browse the repository at this point in the history
  4. v3.1.0

    kjnilsson committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    f5308e5 View commit details
    Browse the repository at this point in the history
Loading