Skip to content

Commit 752d30e

Browse files
Alek5andr-KotovGazizonoki
authored andcommitted
Moved commit "The value of the WriteInflightSize in the main partition" from ydb repo
1 parent 3654a3d commit 752d30e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/client/topic/ut/topic_to_table_ut.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,6 +1898,29 @@ Y_UNIT_TEST_F(WriteToTopic_Demo_27, TFixture)
18981898
}
18991899
}
19001900

1901+
Y_UNIT_TEST_F(WriteToTopic_Demo_28, TFixture)
1902+
{
1903+
// The test verifies that the `WriteInflightSize` is correctly considered for the main partition.
1904+
// Writing to the service partition does not change the `WriteInflightSize` of the main one.
1905+
CreateTopic("topic_A", TEST_CONSUMER);
1906+
1907+
NTable::TSession tableSession = CreateTableSession();
1908+
NTable::TTransaction tx = BeginTx(tableSession);
1909+
1910+
TString message(16'000, 'a');
1911+
1912+
WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID_1, TString(16'000, 'a'), &tx, 0);
1913+
WaitForAcks("topic_A", TEST_MESSAGE_GROUP_ID_1);
1914+
1915+
CommitTx(tx, EStatus::SUCCESS);
1916+
1917+
WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID_2, TString(20'000, 'b'), nullptr, 0);
1918+
WaitForAcks("topic_A", TEST_MESSAGE_GROUP_ID_2);
1919+
1920+
auto messages = ReadFromTopic("topic_A", TEST_CONSUMER, TDuration::Seconds(2), nullptr, 0);
1921+
UNIT_ASSERT_VALUES_EQUAL(messages.size(), 2);
1922+
}
1923+
19011924
}
19021925

19031926
}

0 commit comments

Comments
 (0)