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

Feature/3340 Add best-effort replay sink #3798

Closed
wants to merge 4 commits into from

Conversation

MikkelHJuul
Copy link

This PR adds the ArraySizeBoundReplayBuffer, and links it for the user via Sink.many().replay().bestEffort().

This new spec offer support for the purely size-bound buffer implementations. It adds #limit(n), #latest() and #latestOrDefault(T), reflecting the same methods from its parent, Sink.many().replay().
The ArraySizeBoundReplayBuffer in contrast to the SizeBoundReplayBuffer will never hold more than the stated items referenced. The SizeBoundReplayBuffer, through the Subscription, will retain old references, such that they can be replayed to the subscriber. This is very correct, but can also make the buffer grow beyond its bounds, if a subscriber lacks request they will still be able to replay all elements, but these elements remain in memory. The ArraySizeBoundReplayBuffer hold and replay only what is kept in the array.

Fixes issues/3340

@MikkelHJuul MikkelHJuul requested a review from a team as a code owner April 28, 2024 05:44
@MikkelHJuul
Copy link
Author

I still need a few tests to document this further

@MikkelHJuul
Copy link
Author

I'm having pipeline issues with gradle on M1 Mac, so I'm stuck

@chemicL
Copy link
Member

chemicL commented Jul 22, 2024

Closing as explained in #3340 (comment).

@chemicL chemicL closed this Jul 22, 2024
@chemicL chemicL added the status/declined We feel we shouldn't currently apply this change/suggestion label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/declined We feel we shouldn't currently apply this change/suggestion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants