@@ -146,11 +146,11 @@ class TReadProxy : public TActorBootstrapped<TReadProxy> {
146
146
PreparedResponse = std::make_shared<NKikimrClient::TResponse>();
147
147
}
148
148
}
149
-
149
+
150
150
auto & responseRecord = isDirectRead ? *PreparedResponse : Response->Record ;
151
151
responseRecord.SetStatus (NMsgBusProxy::MSTATUS_OK);
152
- responseRecord.SetErrorCode (NPersQueue::NErrorCode::OK);
153
-
152
+ responseRecord.SetErrorCode (NPersQueue::NErrorCode::OK);
153
+
154
154
Y_ABORT_UNLESS (readResult.ResultSize () > 0 );
155
155
bool isStart = false ;
156
156
if (!responseRecord.HasPartitionResponse ()) {
@@ -191,7 +191,7 @@ class TReadProxy : public TActorBootstrapped<TReadProxy> {
191
191
}
192
192
193
193
if (isNewMsg) {
194
- if (!isStart && readResult.GetResult (i).HasTotalParts ()
194
+ if (!isStart && readResult.GetResult (i).HasTotalParts ()
195
195
&& readResult.GetResult (i).GetTotalParts () + i > readResult.ResultSize ()) // last blob is not full
196
196
break ;
197
197
partResp->AddResult ()->CopyFrom (readResult.GetResult (i));
@@ -292,7 +292,7 @@ class TReadProxy : public TActorBootstrapped<TReadProxy> {
292
292
};
293
293
294
294
295
- TActorId CreateReadProxy (const TActorId& sender, const TActorId& tablet, ui32 tabletGeneration,
295
+ TActorId CreateReadProxy (const TActorId& sender, const TActorId& tablet, ui32 tabletGeneration,
296
296
const TDirectReadKey& directReadKey, const NKikimrClient::TPersQueueRequest& request,
297
297
const TActorContext& ctx)
298
298
{
@@ -304,7 +304,7 @@ class TResponseBuilder {
304
304
public:
305
305
306
306
TResponseBuilder (const TActorId& sender, const TActorId& tablet, const TString& topicName, const ui32 partition, const ui64 messageNo,
307
- const TString& reqId, const TMaybe<ui64> cookie, NMetrics::TResourceMetrics* resourceMetrics,
307
+ const TString& reqId, const TMaybe<ui64> cookie, NMetrics::TResourceMetrics* resourceMetrics,
308
308
const TActorContext& ctx)
309
309
: Sender(sender)
310
310
, Tablet(tablet)
@@ -639,7 +639,7 @@ struct TPersQueue::TReplyToActor {
639
639
Event (std::move(event))
640
640
{
641
641
}
642
-
642
+
643
643
TActorId ActorId;
644
644
TEventBasePtr Event;
645
645
};
@@ -840,7 +840,7 @@ void TPersQueue::ReadConfig(const NKikimrClient::TKeyValueResponse::TReadResult&
840
840
ctx.Send (ctx.SelfID , new TEvents::TEvPoisonPill ());
841
841
return ;
842
842
}
843
-
843
+
844
844
Y_ABORT_UNLESS (readRange.HasStatus ());
845
845
if (readRange.GetStatus () != NKikimrProto::OK && readRange.GetStatus () != NKikimrProto::NODATA) {
846
846
LOG_ERROR_S (ctx, NKikimrServices::PERSQUEUE,
@@ -1267,7 +1267,7 @@ void TPersQueue::FinishResponse(THashMap<ui64, TAutoPtr<TResponseBuilder>>::iter
1267
1267
1268
1268
1269
1269
void TPersQueue::Handle (TEvPersQueue::TEvUpdateConfig::TPtr& ev, const TActorContext& ctx)
1270
- {
1270
+ {
1271
1271
if (!ConfigInited) {
1272
1272
UpdateConfigRequests.emplace_back (ev->Release (), ev->Sender );
1273
1273
return ;
@@ -1304,7 +1304,7 @@ void TPersQueue::TrySendUpdateConfigResponses(const TActorContext& ctx)
1304
1304
1305
1305
ChangeConfigNotification.clear ();
1306
1306
}
1307
-
1307
+
1308
1308
void TPersQueue::CreateTopicConverter (const NKikimrPQ::TPQTabletConfig& config,
1309
1309
NPersQueue::TConverterFactoryPtr& converterFactory,
1310
1310
NPersQueue::TTopicConverterPtr& topicConverter,
@@ -2109,7 +2109,7 @@ void TPersQueue::HandleReadRequest(
2109
2109
ReplyError (ctx, responseCookie, NPersQueue::NErrorCode::READ_ERROR_NO_SESSION,
2110
2110
TStringBuilder () << " Read prepare request with unknown(old?) session id " << cmd.GetSessionId ());
2111
2111
return ;
2112
- }
2112
+ }
2113
2113
}
2114
2114
2115
2115
THolder<TEvPQ::TEvRead> event =
@@ -2375,7 +2375,7 @@ void TPersQueue::Handle(TEvPersQueue::TEvRequest::TPtr& ev, const TActorContext&
2375
2375
}
2376
2376
ResponseProxy[responseCookie] = ans;
2377
2377
Counters->Simple ()[COUNTER_PQ_TABLET_INFLIGHT].Set (ResponseProxy.size ());
2378
-
2378
+
2379
2379
if (!ConfigInited) {
2380
2380
ReplyError (ctx, responseCookie, NPersQueue::NErrorCode::INITIALIZING, " tablet is not ready" );
2381
2381
return ;
@@ -2396,11 +2396,11 @@ void TPersQueue::Handle(TEvPersQueue::TEvRequest::TPtr& ev, const TActorContext&
2396
2396
ReplyError (ctx, responseCookie, NPersQueue::NErrorCode::BAD_REQUEST, " no partition number" );
2397
2397
return ;
2398
2398
}
2399
-
2399
+
2400
2400
TPartitionId partition (req.GetPartition ());
2401
2401
auto it = Partitions.find (partition);
2402
2402
2403
- LOG_DEBUG_S (ctx, NKikimrServices::PERSQUEUE, " Tablet " << TabletID () << " got client message batch for topic '"
2403
+ LOG_DEBUG_S (ctx, NKikimrServices::PERSQUEUE, " Tablet " << TabletID () << " got client message batch for topic '"
2404
2404
<< (TopicConverter ? TopicConverter->GetClientsideName () : " Undefined" ) << " ' partition " << partition);
2405
2405
2406
2406
if (it == Partitions.end ()) {
@@ -2859,7 +2859,7 @@ void TPersQueue::Handle(TEvTxProcessing::TEvReadSet::TPtr& ev, const TActorConte
2859
2859
2860
2860
std::unique_ptr<TEvTxProcessing::TEvReadSetAck> ack;
2861
2861
if (!(event.GetFlags () & NKikimrTx::TEvReadSet::FLAG_NO_ACK)) {
2862
- ack = std::make_unique<TEvTxProcessing::TEvReadSetAck>(*ev->Get (), TabletID ());
2862
+ ack = std::make_unique<TEvTxProcessing::TEvReadSetAck>(*ev->Get (), TabletID ());
2863
2863
}
2864
2864
2865
2865
if (auto tx = GetTransaction (ctx, event.GetTxId ()); tx && tx->Senders .contains (event.GetTabletProducer ())) {
@@ -2927,7 +2927,7 @@ void TPersQueue::Handle(TEvPQ::TEvTxCalcPredicateResult::TPtr& ev, const TActorC
2927
2927
void TPersQueue::Handle (TEvPQ::TEvProposePartitionConfigResult::TPtr& ev, const TActorContext& ctx)
2928
2928
{
2929
2929
const TEvPQ::TEvProposePartitionConfigResult& event = *ev->Get ();
2930
-
2930
+
2931
2931
auto tx = GetTransaction (ctx, event.TxId );
2932
2932
if (!tx) {
2933
2933
return ;
@@ -3582,7 +3582,7 @@ void TPersQueue::CheckTxState(const TActorContext& ctx,
3582
3582
Y_ABORT_UNLESS (tx.PartitionRepliesCount <= tx.PartitionRepliesExpected );
3583
3583
3584
3584
PQ_LOG_T (" TxId=" << tx.TxId << " , State=EXECUTING" <<
3585
- " , tx.PartitionRepliesCount=" << tx.PartitionRepliesCount <<
3585
+ " , tx.PartitionRepliesCount=" << tx.PartitionRepliesCount <<
3586
3586
" , tx.PartitionRepliesExpected=" << tx.PartitionRepliesExpected );
3587
3587
if (tx.PartitionRepliesCount == tx.PartitionRepliesExpected ) {
3588
3588
Y_ABORT_UNLESS (!TxQueue.empty ());
@@ -3728,7 +3728,7 @@ TPartition* TPersQueue::CreatePartitionActor(const TPartitionId& partitionId,
3728
3728
const TActorContext& ctx)
3729
3729
{
3730
3730
int channels = Info ()->Channels .size () - NKeyValue::BLOB_CHANNEL; // channels 0,1 are reserved in tablet
3731
- Y_ABORT_UNLESS (channels > 0 );
3731
+ Y_ABORT_UNLESS (channels > 0 );
3732
3732
3733
3733
return new TPartition (TabletID (),
3734
3734
partitionId,
@@ -3793,7 +3793,7 @@ void TPersQueue::EnsurePartitionsAreNotDeleted(const NKikimrPQ::TPQTabletConfig&
3793
3793
Y_VERIFY_S (was.contains (partition.GetPartitionId ()), " New config is bad, missing partition " << partition.GetPartitionId ());
3794
3794
}
3795
3795
}
3796
-
3796
+
3797
3797
void TPersQueue::InitTransactions (const NKikimrClient::TKeyValueResponse::TReadRangeResult& readRange,
3798
3798
THashMap<ui32, TVector<TTransaction>>& partitionTxs)
3799
3799
{
0 commit comments