Skip to content

Commit

Permalink
Fix message_cleaner buffered message stat (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
numinnex authored Apr 7, 2024
1 parent 3adbf6e commit f5053af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "server"
version = "0.2.15"
version = "0.2.16"
edition = "2021"
build = "src/build.rs"

Expand Down
4 changes: 2 additions & 2 deletions server/src/streaming/segments/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ impl Segment {
return Ok(0);
}

let unsaved_messages_number = unsaved_batches.first().unwrap().base_offset
+ unsaved_batches.last().unwrap().get_last_offset();
let unsaved_messages_number = (unsaved_batches.last().unwrap().get_last_offset() + 1)
- unsaved_batches.first().unwrap().base_offset;

trace!(
"Saving {} messages on disk in segment with start offset: {} for partition with ID: {}...",
Expand Down

0 comments on commit f5053af

Please sign in to comment.