-
Notifications
You must be signed in to change notification settings - Fork 489
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
[Bug]: fluvio produce is not batching when using interactive mode and --delivery-semantic at-least-once
#3143
Comments
Hi @morenol , I'm looking into this with fluvio cli.
Not sure if I got it correctly, or may you give a more detail description? |
@TanNgocDo from what I remember. When we use
So, I think that this is mostly an issue on the CLI impl |
For sure, it should be related to that |
Looking on that 👍 |
@morenol , as I debug, the wait() method will go to fluvio/crates/fluvio/src/producer/record.rs Line 135 in 0377bae
Which is blocked and will be notified by :
It means this wait() method can be only notified by flush():
And to trigger flush(), the linger_sleep must be surpassed:
So whatever the value of linger_time we set, we need to wait till the interval is ended => linger_time is not useful here. To sum up: with current implementation: wait() -> block ->linger_time ends -> flush the batch with only one record -> get response from socket->end of wait(). I'm not sure if this is the right behavior here: at-least-one: should we only send one record per batch = no batching ?, at least the linger_time is not useful with the current implementation of at-least-once(the bigger linger is ,the longer blocking time to send out the batch with one record). So do we need to update the documentation here: https://www.fluvio.io/docs/concepts/delivery-semantics/ ? If we fix it by batching multiple records in at-least-once: should we change from "at-least-once delivery means that for each record handed to the producer potentially multiple attempts are made at delivering it, such that at least one succeeds" to "at-least-once delivery means that for each batch ..." Or keep the current implementation and disable linger_time (for al-least-once).... ? |
@TanNgocDo I think that the ideal solution should be to fix it by batching, regarding the update of the documentation that seems accurate to me though maybe the fact that for every record it is retried could already imply that. Seems to me that the fact that if it is done per batch or record is an implementation detail and is not needed for the general documentation |
Thanks @morenol,
|
I think that option 2 should be ok |
I have just added a small draft change(to make sure in the right direction) for stdin(need to refactor to reduce redundant code), and in interactive mode, it seems that we don't know how it ends input. Maybe a special key ? or keep the list number of record(add more flag to specify the number of record ?) or control the batchsize to maintain list of records for a batch ? |
No description provided.
The text was updated successfully, but these errors were encountered: