Skip to content

Commit

Permalink
branch-3.0: [debug](move-memtable) add debug logs for skip_two_backen…
Browse files Browse the repository at this point in the history
…ds injection cases #46826 (#46849)

Cherry-picked from #46826

Co-authored-by: Kaijie Chen <[email protected]>
  • Loading branch information
github-actions[bot] and kaijchen authored Jan 13, 2025
1 parent 4d68a17 commit 92ef733
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions be/src/vec/sink/writer/vtablet_writer_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,21 @@ Status VTabletWriterV2::_select_streams(int64_t tablet_id, int64_t partition_id,
VLOG_DEBUG << fmt::format("_select_streams P{} I{} T{}", partition_id, index_id, tablet_id);
_tablets_for_node[node_id].emplace(tablet_id, tablet);
auto stream = _load_stream_map->at(node_id)->select_one_stream();
DBUG_EXECUTE_IF("VTabletWriterV2._open_streams.skip_two_backends", {
LOG(INFO) << "[skip_two_backends](detail) tablet_id=" << tablet_id
<< ", node_id=" << node_id
<< ", stream_ok=" << (stream == nullptr ? "no" : "yes");
});
if (stream == nullptr) {
continue;
}
streams.emplace_back(std::move(stream));
}
DBUG_EXECUTE_IF("VTabletWriterV2._open_streams.skip_two_backends", {
LOG(INFO) << "[skip_two_backends](summary) tablet_id=" << tablet_id
<< ", num_streams=" << streams.size()
<< ", num_nodes=" << location->node_ids.size();
});
if (streams.size() <= location->node_ids.size() / 2) {
return Status::InternalError("not enough streams {}/{}", streams.size(),
location->node_ids.size());
Expand Down

0 comments on commit 92ef733

Please sign in to comment.