@@ -33,7 +33,7 @@ namespace NKikimr::NPQ {
33
33
#define INFO (message ) LOG_INFO_S(*NActors::TlsActivationContext, NKikimrServices::PQ_WRITE_PROXY, LOG_PREFIX << message);
34
34
#define ERROR (message ) LOG_ERROR_S(*NActors::TlsActivationContext, NKikimrServices::PQ_WRITE_PROXY, LOG_PREFIX << message);
35
35
36
- static const ui64 WRITE_BLOCK_SIZE = 4_KB;
36
+ static const ui64 WRITE_BLOCK_SIZE = 4_KB;
37
37
38
38
TString TEvPartitionWriter::TEvInitResult::TSuccess::ToString () const {
39
39
auto out = TStringBuilder () << " Success {"
@@ -106,7 +106,7 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
106
106
using EErrorCode = TEvPartitionWriter::TEvWriteResponse::EErrorCode;
107
107
108
108
static constexpr size_t MAX_QUOTA_INFLIGHT = 3 ;
109
-
109
+
110
110
static void FillHeader (NKikimrClient::TPersQueuePartitionRequest& request,
111
111
ui32 partitionId, const TActorId& pipeClient)
112
112
{
@@ -274,11 +274,7 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
274
274
275
275
auto & request = *ev->Record .MutablePartitionRequest ();
276
276
auto & cmd = *request.MutableCmdGetOwnership ();
277
- if (Opts.UseDeduplication ) {
278
- cmd.SetOwner (SourceId);
279
- } else {
280
- cmd.SetOwner (CreateGuidAsString ());
281
- }
277
+ cmd.SetOwner (SourceId);
282
278
cmd.SetForce (true );
283
279
284
280
SetWriteId (request);
@@ -724,16 +720,16 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
724
720
ReceivedQuota.insert (ReceivedQuota.end (), PendingQuota.begin (), PendingQuota.end ());
725
721
PendingQuota.clear ();
726
722
727
- ProcessQuotaAndWrite ();
723
+ ProcessQuotaAndWrite ();
728
724
729
725
break ;
730
726
731
727
case EWakeupTag::RlNoResource:
732
- // Re-requesting the quota. We do this until we get a quota.
728
+ // Re-requesting the quota. We do this until we get a quota.
733
729
// We do not request a quota with a long waiting time because the writer may already be a destroyer, and the quota will still be waiting to be received.
734
730
RequestDataQuota (PendingQuotaAmount, ctx);
735
731
break ;
736
-
732
+
737
733
default :
738
734
Y_VERIFY_DEBUG_S (false , " Unsupported tag: " << static_cast <ui64>(tag));
739
735
}
@@ -754,7 +750,7 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
754
750
, TabletId(tabletId)
755
751
, PartitionId(partitionId)
756
752
, ExpectedGeneration(opts.ExpectedGeneration)
757
- , SourceId(opts.SourceId)
753
+ , SourceId(opts.UseDeduplication ? opts. SourceId : CreateGuidAsString() )
758
754
, Opts(opts)
759
755
{
760
756
if (Opts.MeteringMode ) {
@@ -840,7 +836,7 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
840
836
IActor* CreatePartitionWriter (const TActorId& client,
841
837
// const NKikimrSchemeOp::TPersQueueGroupDescription& config,
842
838
ui64 tabletId,
843
- ui32 partitionId,
839
+ ui32 partitionId,
844
840
const TPartitionWriterOpts& opts) {
845
841
return new TPartitionWriter (client, tabletId, partitionId, opts);
846
842
}
0 commit comments