This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 78c8b9b7fa6 branch-4.1: [fix](scan) Avoid misleading "storage reader"
wrapper for data/expression errors #64755 (#64840)
78c8b9b7fa6 is described below
commit 78c8b9b7fa626e81ee2b885615cf1e643546940f
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jun 26 11:26:19 2026 +0800
branch-4.1: [fix](scan) Avoid misleading "storage reader" wrapper for
data/expression errors #64755 (#64840)
Cherry-picked from #64755
Co-authored-by: Xin Liao <[email protected]>
---
be/src/exec/scan/olap_scanner.cpp | 6 ++++--
.../test_index_compound_directory_fault_injection.groovy | 5 ++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/be/src/exec/scan/olap_scanner.cpp
b/be/src/exec/scan/olap_scanner.cpp
index aa21a657fba..5dec25aca0c 100644
--- a/be/src/exec/scan/olap_scanner.cpp
+++ b/be/src/exec/scan/olap_scanner.cpp
@@ -287,8 +287,10 @@ Status OlapScanner::_open_impl(RuntimeState* state) {
auto res = _tablet_reader->init(_tablet_reader_params);
if (!res.ok()) {
- res.append("failed to initialize storage reader. tablet=" +
- std::to_string(_tablet_reader_params.tablet->tablet_id()) +
+ // init() also runs the eager first-row read that evaluates
pushed-down expressions,
+ // so res may be a data/expression error rather than a storage
failure. Keep its own
+ // message and only append the tablet/backend, without a misleading
storage wording.
+ res.append(". tablet=" +
std::to_string(_tablet_reader_params.tablet->tablet_id()) +
", backend=" + BackendOptions::get_localhost());
return res;
}
diff --git
a/regression-test/suites/fault_injection_p0/test_index_compound_directory_fault_injection.groovy
b/regression-test/suites/fault_injection_p0/test_index_compound_directory_fault_injection.groovy
index ca25f47c88d..a3c90a0a9ae 100644
---
a/regression-test/suites/fault_injection_p0/test_index_compound_directory_fault_injection.groovy
+++
b/regression-test/suites/fault_injection_p0/test_index_compound_directory_fault_injection.groovy
@@ -178,7 +178,10 @@ suite("test_index_compound_directory_fault_injection",
"nonConcurrent") {
res = sql "select COUNT() from
${test_index_compound_directory} where request match 'gif'"
try_sql("DROP TABLE IF EXISTS
${test_index_compound_directory}")
} catch(Exception ex) {
- assertTrue(ex.toString().contains("failed to initialize
storage reader"))
+ // _tablet_reader->init() now returns the underlying error
verbatim and only
+ // appends the tablet/backend context (no longer the misleading
+ // "failed to initialize storage reader" wording).
+ assertTrue(ex.toString().contains("tablet=") &&
ex.toString().contains("backend="))
logger.info("_mock_append_data_error_in_fsindexoutput_flushBuffer, result: " +
ex)
} finally {
GetDebugPoint().disableDebugPointForAllBEs("DorisFSDirectory::FSIndexOutput._mock_append_data_error_in_fsindexoutput_flushBuffer")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]