Skip to content

Commit

Permalink
[UT] Fix flaky test (#46246)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Zhu <zhuming9011@gmail.com>
  • Loading branch information
sduzh authored May 24, 2024
1 parent 06f6cea commit 0951feb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions be/src/runtime/lake_tablets_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ LakeTabletsChannel::~LakeTabletsChannel() {

Status LakeTabletsChannel::open(const PTabletWriterOpenRequest& params, PTabletWriterOpenResult* result,
std::shared_ptr<OlapTableSchemaParam> schema, bool is_incremental) {
DCHECK_EQ(-1, _txn_id);
SCOPED_TIMER(_open_timer);
COUNTER_UPDATE(_open_counter, 1);
std::unique_lock<bthreads::BThreadSharedMutex> l(_rw_mtx);
Expand Down
16 changes: 8 additions & 8 deletions be/test/runtime/lake_tablets_channel_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,17 +834,17 @@ TEST_P(LakeTabletsChannelMultiSenderTest, test_dont_write_txn_log) {
SyncPoint::GetInstance()->DisableProcessing();
});

auto sender_task = [&](int sender_id) {
auto open_request = _open_request;
open_request.set_sender_id(sender_id);
open_request.set_num_senders(num_sender);
open_request.mutable_lake_tablet_params()->set_write_txn_log(false);
auto open_request = _open_request;
open_request.set_sender_id(0);
open_request.set_num_senders(num_sender);
open_request.mutable_lake_tablet_params()->set_write_txn_log(false);

auto open_response = PTabletWriterOpenResult{};
auto open_response = PTabletWriterOpenResult{};

ASSERT_OK(_tablets_channel->open(open_request, &open_response, _schema_param, false));
ASSERT_EQ(0, open_response.status().status_code());
ASSERT_OK(_tablets_channel->open(open_request, &open_response, _schema_param, false));
ASSERT_EQ(0, open_response.status().status_code());

auto sender_task = [&](int sender_id) {
PTabletWriterAddChunkRequest add_chunk_request;
PTabletWriterAddBatchResult add_chunk_response;
add_chunk_request.set_index_id(kIndexId);
Expand Down

0 comments on commit 0951feb

Please sign in to comment.