Skip to content

Commit

Permalink
fix implicit cast offset to bool (#4846)
Browse files Browse the repository at this point in the history
  • Loading branch information
ildar-khisambeev authored May 28, 2024
1 parent cf18f7a commit c6e5736
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ void TReadSessionEvent::TCreatePartitionStreamEvent::Confirm(TMaybe<ui64> readOf
}
}

TReadSessionEvent::TDestroyPartitionStreamEvent::TDestroyPartitionStreamEvent(TPartitionStream::TPtr partitionStream, bool committedOffset)
TReadSessionEvent::TDestroyPartitionStreamEvent::TDestroyPartitionStreamEvent(TPartitionStream::TPtr partitionStream, ui64 committedOffset)
: PartitionStream(std::move(partitionStream))
, CommittedOffset(committedOffset)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ struct TReadSessionEvent {

TString DebugString() const;

TDestroyPartitionStreamEvent(TPartitionStream::TPtr partitionStream, bool committedOffset);
TDestroyPartitionStreamEvent(TPartitionStream::TPtr partitionStream, ui64 committedOffset);

private:
TPartitionStream::TPtr PartitionStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ void TPrintable<TStartPartitionSessionEvent>::DebugString(TStringBuilder& ret, b
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// NTopic::TReadSessionEvent::TStopPartitionSessionEvent

TStopPartitionSessionEvent::TStopPartitionSessionEvent(TPartitionSession::TPtr partitionSession, bool committedOffset)
TStopPartitionSessionEvent::TStopPartitionSessionEvent(TPartitionSession::TPtr partitionSession, ui64 committedOffset)
: TPartitionSessionAccessor(std::move(partitionSession))
, CommittedOffset(committedOffset) {
}
Expand Down
4 changes: 2 additions & 2 deletions ydb/public/sdk/cpp/client/ydb_topic/include/read_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ struct TReadSessionEvent {
//! Server command for creating and starting partition session.
struct TStartPartitionSessionEvent: public TPartitionSessionAccessor,
public TPrintable<TStartPartitionSessionEvent> {
explicit TStartPartitionSessionEvent(TPartitionSession::TPtr, ui64 committedOffset, ui64 endOffset);
TStartPartitionSessionEvent(TPartitionSession::TPtr, ui64 committedOffset, ui64 endOffset);

//! Current committed offset in partition session.
ui64 GetCommittedOffset() const {
Expand All @@ -268,7 +268,7 @@ struct TReadSessionEvent {
//! Server can destroy partition session gracefully
//! for rebalancing among all topic clients.
struct TStopPartitionSessionEvent: public TPartitionSessionAccessor, public TPrintable<TStopPartitionSessionEvent> {
TStopPartitionSessionEvent(TPartitionSession::TPtr partitionSession, bool committedOffset);
TStopPartitionSessionEvent(TPartitionSession::TPtr partitionSession, ui64 committedOffset);

//! Last offset of the partition session that was committed.
ui64 GetCommittedOffset() const {
Expand Down

0 comments on commit c6e5736

Please sign in to comment.