This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8bcedb4e8bd [Bug](exec) Return error is materialization_opertor not
found right backend id (#58470)
8bcedb4e8bd is described below
commit 8bcedb4e8bd8922249b4f537e063d6e9f19ad8bb
Author: HappenLee <[email protected]>
AuthorDate: Thu Dec 25 17:28:50 2025 +0800
[Bug](exec) Return error is materialization_opertor not found right backend
id (#58470)
if we access block map in materialization_opertor in query timeout
query. Not found the right result, maybe cause nullpt access
---
be/src/pipeline/exec/materialization_opertor.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/be/src/pipeline/exec/materialization_opertor.cpp
b/be/src/pipeline/exec/materialization_opertor.cpp
index 689d345dd0a..51f07d65002 100644
--- a/be/src/pipeline/exec/materialization_opertor.cpp
+++ b/be/src/pipeline/exec/materialization_opertor.cpp
@@ -55,7 +55,7 @@ void MaterializationSharedState::get_block(vectorized::Block*
block) {
}
Status MaterializationSharedState::merge_multi_response() {
- std::map<int64_t, std::pair<vectorized::Block, int>> _block_maps;
+ std::unordered_map<int64_t, std::pair<vectorized::Block, int>> block_maps;
for (int i = 0; i < block_order_results.size(); ++i) {
for (auto& [backend_id, rpc_struct] : rpc_struct_map) {
vectorized::Block partial_block;
@@ -71,14 +71,20 @@ Status MaterializationSharedState::merge_multi_response() {
}
if (!partial_block.is_empty_column()) {
- _block_maps[backend_id] =
std::make_pair(std::move(partial_block), 0);
+ block_maps[backend_id] =
std::make_pair(std::move(partial_block), 0);
}
}
for (int j = 0; j < block_order_results[i].size(); ++j) {
auto backend_id = block_order_results[i][j];
if (backend_id) {
- auto& source_block_rows = _block_maps[backend_id];
+ if (UNLIKELY(block_maps.find(backend_id) == block_maps.end()))
{
+ return Status::InternalError(
+
fmt::format("MaterializationSharedState::merge_multi_response, "
+ "backend_id {} not found in
block_maps",
+ backend_id));
+ }
+ auto& source_block_rows = block_maps[backend_id];
DCHECK(source_block_rows.second <
source_block_rows.first.rows());
for (int k = 0; k < response_blocks[i].columns(); ++k) {
response_blocks[i].get_column_by_position(k)->insert_from(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]