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

yiguolei 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 fff5c85a71f [bugfix](stop) should skip the loop when graceful stop 
(#33212)
fff5c85a71f is described below

commit fff5c85a71fe347dda41f33dd695002953c49521
Author: yiguolei <676222...@qq.com>
AuthorDate: Wed Apr 3 17:09:58 2024 +0800

    [bugfix](stop) should skip the loop when graceful stop (#33212)
    
    Co-authored-by: yiguolei <yiguo...@gmail.com>
---
 be/src/olap/olap_server.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp
index 97ffc5bc11a..e81dcd643f4 100644
--- a/be/src/olap/olap_server.cpp
+++ b/be/src/olap/olap_server.cpp
@@ -680,7 +680,8 @@ void StorageEngine::_update_replica_infos_callback() {
 
         int start = 0;
         int tablet_size = all_tablets.size();
-        while (start < tablet_size) {
+        // The while loop may take a long time, we should skip it when stop
+        while (start < tablet_size && _stop_background_threads_latch.count() > 
0) {
             int batch_size = std::min(100, tablet_size - start);
             int end = start + batch_size;
             TGetTabletReplicaInfosRequest request;


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

Reply via email to