diff options
| author | Nikolay Shestakov <[email protected]> | 2024-01-23 15:04:36 +0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-01-23 15:04:36 +0500 |
| commit | 8797869d3ac5754499b3a95170a0a8d32d35dc6c (patch) | |
| tree | 7b2f0be3ce8f2df7581ff72546f782cb64c5b80e | |
| parent | 495492149ec9071143c3ee4ada4a4b379be76117 (diff) | |
Use fallthrough and fix holder initialization (#1221)
| -rw-r--r-- | ydb/core/kafka_proxy/kafka_connection.cpp | 6 | ||||
| -rw-r--r-- | ydb/core/persqueue/pq_impl.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ydb/core/kafka_proxy/kafka_connection.cpp b/ydb/core/kafka_proxy/kafka_connection.cpp index de4ca12a8d8..cca30578702 100644 --- a/ydb/core/kafka_proxy/kafka_connection.cpp +++ b/ydb/core/kafka_proxy/kafka_connection.cpp @@ -606,6 +606,8 @@ protected: Step = INFLIGTH_CHECK; + [[fallthrough]]; + case INFLIGTH_CHECK: if (!Context->Authenticated() && !PendingRequestsQueue.empty()) { // Allow only one message to be processed at a time for non-authenticated users @@ -618,6 +620,8 @@ protected: InflightSize += Request->ExpectedSize; Step = MESSAGE_READ; + [[fallthrough]]; + case HEADER_READ: KAFKA_LOG_T("start read header. ExpectedSize=" << Request->ExpectedSize); @@ -649,6 +653,8 @@ protected: Step = MESSAGE_READ; + [[fallthrough]]; + case MESSAGE_READ: KAFKA_LOG_T("start read new message. ExpectedSize=" << Request->ExpectedSize); diff --git a/ydb/core/persqueue/pq_impl.cpp b/ydb/core/persqueue/pq_impl.cpp index 7a249bb3fda..a26eef66028 100644 --- a/ydb/core/persqueue/pq_impl.cpp +++ b/ydb/core/persqueue/pq_impl.cpp @@ -3890,7 +3890,7 @@ void TPersQueue::Handle(TEvPQ::TEvSourceIdRequest::TPtr& ev, const TActorContext if (it == Partitions.end()) { LOG_INFO_S(ctx, NKikimrServices::PERSQUEUE, "Unknown partition " << record.GetPartition()); - auto response = THolder<TEvPQ::TEvSourceIdResponse>(); + auto response = MakeHolder<TEvPQ::TEvSourceIdResponse>(); response->Record.SetError("Partition was not found"); Send(ev->Sender, response.Release()); |
