Skip to content

Commit d92de94

Browse files
[+] comments
1 parent 7bc7d5d commit d92de94

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ydb/core/persqueue/partition.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,6 +2310,8 @@ void TPartition::CommitWriteOperations(TTransaction& t)
23102310

23112311
if (!t.WriteInfo->BlobsFromHead.empty()) {
23122312
auto& first = t.WriteInfo->BlobsFromHead.front();
2313+
// In one operation, a partition can write blocks of several transactions. Some of them can be broken down
2314+
// into parts. We need to take this division into account.
23132315
NewHead.PartNo += first.GetPartNo();
23142316

23152317
Parameters->HeadCleared = Parameters->HeadCleared || !t.WriteInfo->BodyKeys.empty();

ydb/public/sdk/cpp/src/client/topic/ut/topic_to_table_ut.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2916,7 +2916,8 @@ Y_UNIT_TEST_F(Write_Random_Sized_Messages_In_Wide_Transactions, TFixture)
29162916
// The test verifies the simultaneous execution of several transactions. There is a topic
29172917
// with PARTITIONS_COUNT partitions. In each transaction, the test writes to all the partitions.
29182918
// The size of the messages is random. Such that both large blobs in the body and small ones in
2919-
// the head of the partition are obtained.
2919+
// the head of the partition are obtained. Message sizes are multiples of 500 KB. This way we
2920+
// will make sure that when committing transactions, the division into blocks is taken into account.
29202921

29212922
const size_t PARTITIONS_COUNT = 20;
29222923
const size_t TXS_COUNT = 100;

0 commit comments

Comments
 (0)