Skip to content

Commit 8ac0c42

Browse files
committed
Use fallthrough and fix holder initialization
1 parent 50a1147 commit 8ac0c42

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ydb/core/kafka_proxy/kafka_connection.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,8 @@ class TKafkaConnection: public TActorBootstrapped<TKafkaConnection>, public TNet
606606

607607
Step = INFLIGTH_CHECK;
608608

609+
[[fallthrough]];
610+
609611
case INFLIGTH_CHECK:
610612
if (!Context->Authenticated() && !PendingRequestsQueue.empty()) {
611613
// Allow only one message to be processed at a time for non-authenticated users
@@ -618,6 +620,8 @@ class TKafkaConnection: public TActorBootstrapped<TKafkaConnection>, public TNet
618620
InflightSize += Request->ExpectedSize;
619621
Step = MESSAGE_READ;
620622

623+
[[fallthrough]];
624+
621625
case HEADER_READ:
622626
KAFKA_LOG_T("start read header. ExpectedSize=" << Request->ExpectedSize);
623627

@@ -649,6 +653,8 @@ class TKafkaConnection: public TActorBootstrapped<TKafkaConnection>, public TNet
649653

650654
Step = MESSAGE_READ;
651655

656+
[[fallthrough]];
657+
652658
case MESSAGE_READ:
653659
KAFKA_LOG_T("start read new message. ExpectedSize=" << Request->ExpectedSize);
654660

ydb/core/persqueue/pq_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3890,7 +3890,7 @@ void TPersQueue::Handle(TEvPQ::TEvSourceIdRequest::TPtr& ev, const TActorContext
38903890
if (it == Partitions.end()) {
38913891
LOG_INFO_S(ctx, NKikimrServices::PERSQUEUE, "Unknown partition " << record.GetPartition());
38923892

3893-
auto response = THolder<TEvPQ::TEvSourceIdResponse>();
3893+
auto response = MakeHolder<TEvPQ::TEvSourceIdResponse>();
38943894
response->Record.SetError("Partition was not found");
38953895
Send(ev->Sender, response.Release());
38963896

0 commit comments

Comments
 (0)