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

yiguolei 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 f8307f1a1a [bugfix](scanner) when scanner init failed during get 
tablet, not need call update counters (#22117)
f8307f1a1a is described below

commit f8307f1a1a15b9bd2f90fd32485341bd9d36870f
Author: yiguolei <[email protected]>
AuthorDate: Sun Jul 23 10:19:20 2023 +0800

    [bugfix](scanner) when scanner init failed during get tablet, not need call 
update counters (#22117)
    
    Co-authored-by: yiguolei <[email protected]>
    If the scanner is failed during init or open, then not need update counters 
because the query is fail and the counter is useless.
    And it may core during update counters. For example, update counters depend 
on scanner's tablet, but the tablet == null when init failed.
---
 be/src/vec/exec/scan/vscanner.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/exec/scan/vscanner.h b/be/src/vec/exec/scan/vscanner.h
index f8e0342e9b..2c7ceda8fd 100644
--- a/be/src/vec/exec/scan/vscanner.h
+++ b/be/src/vec/exec/scan/vscanner.h
@@ -126,7 +126,13 @@ public:
     bool need_to_close() { return _need_to_close; }
 
     void mark_to_need_to_close() {
-        _update_counters_before_close();
+        // If the scanner is failed during init or open, then not need update 
counters
+        // because the query is fail and the counter is useless. And it may 
core during
+        // update counters. For example, update counters depend on scanner's 
tablet, but
+        // the tablet == null when init failed.
+        if (_is_open) {
+            _update_counters_before_close();
+        }
         _need_to_close = true;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to