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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 0f387691021 [fix](scan) Fix missing shared tablet header lock (#31433)
0f387691021 is described below

commit 0f387691021b6180b9dafc09874b5cd855b3d769
Author: plat1ko <platonekos...@gmail.com>
AuthorDate: Mon Feb 26 23:39:10 2024 +0800

    [fix](scan) Fix missing shared tablet header lock (#31433)
---
 be/src/olap/parallel_scanner_builder.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/parallel_scanner_builder.cpp 
b/be/src/olap/parallel_scanner_builder.cpp
index d25bcdc7a2f..a7f7d6da001 100644
--- a/be/src/olap/parallel_scanner_builder.cpp
+++ b/be/src/olap/parallel_scanner_builder.cpp
@@ -46,8 +46,11 @@ Status 
ParallelScannerBuilder<ParentType>::_build_scanners_by_rowid(
 
         TabletReader::ReadSource reade_source_with_delete_info;
         if (!_state->skip_delete_predicate()) {
-            RETURN_IF_ERROR(tablet->capture_rs_readers(
-                    {0, version}, &reade_source_with_delete_info.rs_splits, 
false));
+            {
+                std::shared_lock rdlock(tablet->get_header_lock());
+                RETURN_IF_ERROR(tablet->capture_rs_readers(
+                        {0, version}, 
&reade_source_with_delete_info.rs_splits, false));
+            }
             reade_source_with_delete_info.fill_delete_predicates();
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to