Skip to content

Commit

Permalink
Merge pull request #2 from supplyon/bugfix/skip_reading_compacted_logs
Browse files Browse the repository at this point in the history
Bugfix: Skip reading compacted logs
  • Loading branch information
ThomasObenaus authored Nov 8, 2023
2 parents ce233f1 + 120bd39 commit f36960f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions message_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (r *messageSetReader) readMessageV1(min int64, key readBytesFunc, val readB

func (r *messageSetReader) readMessageV2(_ int64, key readBytesFunc, val readBytesFunc) (
offset int64, lastOffset int64, timestamp int64, headers []Header, err error) {
/*for r.count == 0 {
for r.count == 0 {
r.log("Read next header (skip compacted log entry) since header.count is 0")

// Keep reading new headers since in some cases when compacted logs is enabled, the broker may
Expand All @@ -264,7 +264,7 @@ func (r *messageSetReader) readMessageV2(_ int64, key readBytesFunc, val readByt
}
// Keep this as an infinite loop since in case the batch ended up with a compacted record, it will throws EOF
// and will be handled in the caller scope (batch).
}*/
}

if r.count == int(r.header.v2.count) { // first time reading this set, so check for compression headers.
var codec CompressionCodec
Expand Down

0 comments on commit f36960f

Please sign in to comment.