You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This updates the ticker logic in the batch writers to reset the ticker when a flush happens. This is better, as it still guarantees that a message won't be delayed by more than batch_timeout, but we don't risk flushing a very small batch because we must flush at regular intervals either.
The choice of resetting _after_ the flush is deliberate: it means that the maximum amount of time between flushes is:
```
max_time = flush_time + batch_timeout
```
otherwise we could do:
```
max_time = batch_timeout
```
but if a flush were to then longer than the batch timeout, we can end up in a cycle of flushing again immediately after the previous flush finishes.
0 commit comments