This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 8df401fcfe4 branch-4.0: [fix](scan) Avoid misleading "storage reader" 
wrapper for data/expression errors #64755 (#64838)
8df401fcfe4 is described below

commit 8df401fcfe4b64e5939716ccd86c9963eaa6ae2a
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Jul 27 17:16:34 2026 +0800

    branch-4.0: [fix](scan) Avoid misleading "storage reader" wrapper for 
data/expression errors #64755 (#64838)
    
    Cherry-picked from #64755
    
    Co-authored-by: Xin Liao <[email protected]>
---
 be/src/vec/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/vec/exec/scan/olap_scanner.cpp 
b/be/src/vec/exec/scan/olap_scanner.cpp
index ca91666a523..3b26b7bc07b 100644
--- a/be/src/vec/exec/scan/olap_scanner.cpp
+++ b/be/src/vec/exec/scan/olap_scanner.cpp
@@ -285,8 +285,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]

Reply via email to