Skip to content

Commit ed13352

Browse files
ubyteGazizonoki
authored andcommitted
Pass read offset in the PartitionStatus response (#24748)
1 parent ef51fb1 commit ed13352

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/last_commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
110937321b45fb3be9ca39ff3bb83bcdfcf52c97
1+
2e6b589fa47b74662114ecad23c188f935c4b556

src/api/protos/ydb_topic.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ message StreamReadMessage {
475475

476476
// Write timestamp of next message written to this partition will be no less than write_time_high_watermark.
477477
google.protobuf.Timestamp write_time_high_watermark = 4;
478+
479+
// Messages with offsets up to and including (read_offset - 1) was read.
480+
int64 read_offset = 5;
478481
}
479482

480483
// Command from server to create and start a partition session.

src/client/topic/impl/read_session_impl.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,7 @@ inline void TSingleClusterReadSessionImpl<false>::OnReadDoneImpl(
17011701
bool pushRes = EventsQueue->PushEvent(partitionStreamIt->second,
17021702
TReadSessionEvent::TPartitionSessionStatusEvent(
17031703
partitionStreamIt->second, msg.committed_offset(),
1704-
0, // TODO: support read offset in status
1704+
msg.read_offset(),
17051705
msg.partition_offsets().end(),
17061706
TInstant::MilliSeconds(::google::protobuf::util::TimeUtil::TimestampToMilliseconds(
17071707
msg.write_time_high_watermark()))),

0 commit comments

Comments
 (0)