Add per-request buffer_time option#168
Merged
Merged
Conversation
bjosv
reviewed
Apr 15, 2026
bjosv
left a comment
Collaborator
There was a problem hiding this comment.
Some nits/questions but LGTM
bjosv
approved these changes
Apr 17, 2026
Collaborator
|
LGTM |
WilliamVoong
approved these changes
Apr 28, 2026
0810a55 to
5ce98c4
Compare
Collaborator
|
Hi, I tested your changes and I think it looks great now 👍 You have my approval for delivery. |
Commands can be sent with an optional map of request options:
ered:command(Pid, Cmd, #{buffer_time => 10, timeout => 5000}).
When buffer_time is non-zero, the command is buffered and a timer is
started. Buffered commands are flushed when the timer fires. If an
unbuffered command (buffer_time => 0, the default) arrives while there
are buffered commands, everything is flushed immediately. This allows
coalescing multiple commands into fewer TCP packets and TLS records.
The request options map is supported in ered:command/3,
ered:command_async/4, ered_cluster:command/4 and
ered_cluster:command_async/5. Passing a plain timeout as before
still works for backward compatibility.
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
1363c76 to
9ea7268
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commands can be sent with an optional map of request options:
When buffer_time is non-zero, the command is buffered and a timer is started. Buffered commands are flushed when the timer fires. If an unbuffered command (buffer_time => 0, the default) arrives while there are buffered commands, everything is flushed immediately. This allows coalescing multiple commands into fewer TCP packets and TLS records.
The request options map is supported in ered:command/3, ered:command_async/4, ered_cluster:command/4 and ered_cluster:command_async/5. Passing a plain timeout as before still works for backward compatibility.