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

Ra v2.16.0 #12713

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Ra v2.16.0 #12713

wants to merge 4 commits into from

Conversation

kjnilsson
Copy link
Contributor

@kjnilsson kjnilsson commented Nov 13, 2024

This version of Ra contains a substantially refactored Ra log implementation that provides higher throughput and lower memory use in several scenarios.

Changes:

  • QQ: Use new log_ext effect

    This offloads the work of reading messages from on-disk segments
    to the interacting process (typically a session or channel process)
    rather than doing this blocking, performance affecting work in the
    Ra server process.

  • Ensure opened segments are closed after some time of inactivity

    Processes that have received messages that had to be read from disks
    may keep a segment open indefinitely. This introduces a timer which
    after some time of inactivity will close all opened segments to ensure
    file descriptors are not kept open indefinitely.

  • Use initial_machine_version config to avoid initialising from rabbit_fifo version 0.

  • Use initial_machine_version config to avoid initialising from rabbit_stream_coordinator version 0.

  • Avoid dead lock in queue federation.

    When processing the queue federation startup even the process
    may call back into the Ra process causing a deadlock. in this
    case we spawn a temporary process to avoid this.

@kjnilsson kjnilsson force-pushed the ra-2.16.0 branch 7 times, most recently from c820291 to 115eb3a Compare December 2, 2024 14:29
@kjnilsson kjnilsson added this to the 4.1.0 milestone Dec 12, 2024
@kjnilsson kjnilsson force-pushed the ra-2.16.0 branch 2 times, most recently from d5e6df0 to eed6294 Compare January 6, 2025 15:04
@kjnilsson kjnilsson force-pushed the ra-2.16.0 branch 2 times, most recently from 3c6be7e to 562756c Compare January 15, 2025 09:54
@kjnilsson kjnilsson force-pushed the ra-2.16.0 branch 3 times, most recently from 70590f2 to 1c4d221 Compare January 23, 2025 10:24
This version of Ra contains a substantially refactored Ra log
implementation that provides higher throughput and lower
memory use in serveral scenarios.

New features:

* `log_ext` new effect type that instead of immedately reading
entries from the log it will instead provide a read plan for any
entries only located in segments.

* Machine version upgrades can now be be delayed until all
members are confirmed to support the new version.
This will avoid potential consumption pauses during upgrades.
This offloads the work of reading messages from on-disk segments
to the interacting process rather than doing this blocking, performance
affecting work in the ra server process.

QQ: ensure opened segments are closed after some time of inactivity

Processes that havea received messages that had to be read from disks
may keep a segment open indefinitely. This introduces a timer which
after some time of inactivity will close all opened segments to ensure
file descriptors are not kept open indefinitely.
from rabbit_fifo version 0.

The same was also implemented for the stream coordinator.

QQ: avoid dead lock in queue federation.

When processing the queue federation startup even the process
may call back into the ra process causing a deadlock. in this
case we spawn a temporary process to avoid this.
And be less confusing around the arguments that add_member/4 actually
takes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant