diff --git a/be/src/vec/sink/writer/vtablet_writer_v2.cpp b/be/src/vec/sink/writer/vtablet_writer_v2.cpp index b0a39ac2a76338..2550fb172c57c1 100644 --- a/be/src/vec/sink/writer/vtablet_writer_v2.cpp +++ b/be/src/vec/sink/writer/vtablet_writer_v2.cpp @@ -549,32 +549,10 @@ Status VTabletWriterV2::close(Status exec_status) { TTabletCommitInfo commit_info; commit_info.tabletId = tablet_id; commit_info.backendId = node_id; - _missing_tablets.erase(tablet_id); tablet_commit_infos.emplace_back(std::move(commit_info)); } } } - if (!tablet_commit_infos.empty() && !_missing_tablets.empty()) { - std::stringstream ss; - ss << "pre-commit check failed, missing " << _missing_tablets.size() << " tablets:"; - int print_limit = 3; - for (auto tablet_id : _missing_tablets | std::ranges::views::take(print_limit)) { - ss << " (tablet_id=" << tablet_id; - auto backends = _location->find_tablet(tablet_id)->node_ids; - ss << ", backend_id=["; - bool first = true; - for (auto& backend_id : backends) { - (first ? ss : ss << ',') << backend_id; - first = false; - } - ss << "])"; - } - if (_missing_tablets.size() > print_limit) { - ss << ", ..."; - } - LOG(INFO) << ss.str() << ", load_id=" << print_id(_load_id); - return Status::InternalError(ss.str()); - } _state->tablet_commit_infos().insert(_state->tablet_commit_infos().end(), std::make_move_iterator(tablet_commit_infos.begin()), std::make_move_iterator(tablet_commit_infos.end())); @@ -605,7 +583,6 @@ Status VTabletWriterV2::_close_load(const Streams& streams) { for (auto [tablet_id, tablet] : _tablets_for_node[node_id]) { if (_tablet_finder->partition_ids().contains(tablet.partition_id())) { tablets_to_commit.push_back(tablet); - _missing_tablets.insert(tablet_id); } } for (const auto& stream : streams) { diff --git a/be/src/vec/sink/writer/vtablet_writer_v2.h b/be/src/vec/sink/writer/vtablet_writer_v2.h index 37558974197548..e99bbd92696cfb 100644 --- a/be/src/vec/sink/writer/vtablet_writer_v2.h +++ b/be/src/vec/sink/writer/vtablet_writer_v2.h @@ -211,7 +211,7 @@ class VTabletWriterV2 final : public AsyncResultWriter { RuntimeState* _state = nullptr; // not owned, set when open RuntimeProfile* _profile = nullptr; // not owned, set when open - std::unordered_set _missing_tablets; + std::unordered_set _opened_partitions; std::unordered_map> _tablets_for_node; std::unordered_map> _indexes_from_node;