diff options
| author | alexnick <[email protected]> | 2022-08-15 12:02:28 +0300 | 
|---|---|---|
| committer | alexnick <[email protected]> | 2022-08-15 12:02:28 +0300 | 
| commit | bb7e76b0f228f9c9b0d19c2d6e92640b57124cd6 (patch) | |
| tree | 5b1d0fe990544929cdcc86627b30695b40c20a35 | |
| parent | aaa567c2c9d8614ef61993e9e66d8faa69df14d3 (diff) | |
reduce KQP requests count bugfix
| -rw-r--r-- | ydb/services/persqueue_v1/actors/write_session_actor.cpp | 6 | ||||
| -rw-r--r-- | ydb/services/persqueue_v1/actors/write_session_actor.h | 1 | 
2 files changed, 3 insertions, 4 deletions
diff --git a/ydb/services/persqueue_v1/actors/write_session_actor.cpp b/ydb/services/persqueue_v1/actors/write_session_actor.cpp index acf3841435f..eb99065dc27 100644 --- a/ydb/services/persqueue_v1/actors/write_session_actor.cpp +++ b/ydb/services/persqueue_v1/actors/write_session_actor.cpp @@ -574,11 +574,11 @@ void TWriteSessionActor::Handle(NKqp::TEvKqp::TEvQueryResponse::TPtr &ev, const          }          LOG_INFO_S(ctx, NKikimrServices::PQ_WRITE_PROXY, "session v1 cookie: " << Cookie << " sessionId: " << OwnerCookie << " messageGroupId " -            << SourceId << " escaped " << EncodedSourceId.EscapedSourceId << " hash " << CompatibleHash << " partition " << Partition << " partitions " -            << PartitionToTablet.size() << "(" << CompatibleHash % PartitionToTablet.size() << ") create " << SourceIdCreateTime << " result " << t); +            << SourceId << " escaped " << EncodedSourceId.EscapedSourceId << " partition " << Partition << " partitions " +            << PartitionToTablet.size() << "(" << EncodedSourceId.Hash % PartitionToTablet.size() << ") create " << SourceIdCreateTime << " result " << t);          if (!PartitionFound && (PreferedPartition < Max<ui32>() || !AppData(ctx)->PQConfig.GetRoundRobinPartitionMapping())) { -            Partition = PreferedPartition < Max<ui32>() ? PreferedPartition : CompatibleHash % PartitionToTablet.size(); //choose partition default value +            Partition = PreferedPartition < Max<ui32>() ? PreferedPartition : EncodedSourceId.Hash % PartitionToTablet.size(); //choose partition default value              PartitionFound = true;          } diff --git a/ydb/services/persqueue_v1/actors/write_session_actor.h b/ydb/services/persqueue_v1/actors/write_session_actor.h index 335b9e91189..aa82c2ed40d 100644 --- a/ydb/services/persqueue_v1/actors/write_session_actor.h +++ b/ydb/services/persqueue_v1/actors/write_session_actor.h @@ -163,7 +163,6 @@ private:      // 'SourceId' is called 'MessageGroupId' since gRPC data plane API v1      TString SourceId; // TODO: Replace with 'MessageGroupId' everywhere      NPQ::NSourceIdEncoding::TEncodedSourceId EncodedSourceId; -    ui32 CompatibleHash;      TString OwnerCookie;      TString UserAgent;  | 
