Skip to content

Commit

Permalink
Merge pull request #10869 from michael-redpanda/backport-10782-v22.3.x
Browse files Browse the repository at this point in the history
[v22.3.x] cloud_storage: fix empty segment check in reader
  • Loading branch information
michael-redpanda committed May 19, 2023
2 parents b412a64 + e432391 commit 0336553
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/v/cloud_storage/remote_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,11 @@ remote_partition::borrow_result_t remote_partition::borrow_next_reader(
if (mit->second.delta_offset_end == model::offset_delta{}) {
break;
}

// If a segment contains kafka data batches, its next offset will
// be greater than its base offset.
auto b = mit->second.base_kafka_offset();
auto end = mit->second.next_kafka_offset() - kafka::offset(1);
auto end = mit->second.next_kafka_offset();
if (b != end) {
break;
}
Expand Down

0 comments on commit 0336553

Please sign in to comment.