Skip to content

Commit

Permalink
Use now for CreateTime by default (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
nshestakov authored Feb 5, 2024
1 parent 32d577d commit 4237dfb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ydb/core/kafka_proxy/actors/kafka_produce_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ THolder<TEvPartitionWriter::TEvWriteRequest> Convert(const TProduceRequestData::
w->SetSourceId(sourceId);
w->SetSeqNo(batch->BaseOffset + record.OffsetDelta);
w->SetData(str);
w->SetCreateTimeMS(batch->BaseTimestamp + record.TimestampDelta);
ui64 createTime = batch->BaseTimestamp + record.TimestampDelta;
w->SetCreateTimeMS(createTime ? createTime : TInstant::Now().MilliSeconds());
w->SetDisableDeduplication(true);
w->SetUncompressedSize(record.Value ? record.Value->size() : 0);
w->SetClientDC(clientDC);
Expand Down

0 comments on commit 4237dfb

Please sign in to comment.