Skip to content

Commit

Permalink
[debug](move-memtable) add debug logs for skip_two_backends injection…
Browse files Browse the repository at this point in the history
… cases (apache#46826)
  • Loading branch information
kaijchen authored Jan 12, 2025
1 parent 4f68b81 commit 95b5b00
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 @@ -392,11 +392,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 95b5b00

Please sign in to comment.