-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server): correct batch materialization logic in BatchAccumulator (#…
…1555) This commit refactors the `BatchAccumulator` by removing the `capacity` field and simplifying the logic for materializing batches. The `materialize_batch_and_maybe_update_state` method is renamed to `materialize_batch_and_update_state`, and the logic for handling message offsets and timestamps is streamlined. The changes improve the clarity and efficiency of the batch processing logic, addressing issues with the previous handling of `has_remainder`. Additionally, the logic in `writing_messages.rs` is updated to reflect these changes, ensuring that unsaved messages are correctly managed based on batch size. Now, instead of having hard-limit of `messages_required_to_save` we will trigger it once when capacity if exceeded and save all messages on disk, instead of handling remainder.
- Loading branch information
Showing
7 changed files
with
35 additions
and
37 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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