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

commit 833da32285e50e19cc4728cb514f79ae9b75b745
Author: zhannngchen <48427519+zhannngc...@users.noreply.github.com>
AuthorDate: Wed Feb 7 22:28:30 2024 +0800

    [fix](gc) fix a core introduced by #30854 (#30932)
    
    introduced by #30854, if it is the end of the map _unused_rowsets, program 
will core.
---
 be/src/olap/storage_engine.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/olap/storage_engine.cpp b/be/src/olap/storage_engine.cpp
index f1ba693a500..26c58b04838 100644
--- a/be/src/olap/storage_engine.cpp
+++ b/be/src/olap/storage_engine.cpp
@@ -1095,7 +1095,6 @@ void StorageEngine::start_delete_unused_rowset() {
                 }
                 it = _unused_rowsets.erase(it);
             } else {
-                ++it;
                 if (rs.use_count() != 1) {
                     ++due_to_use_count;
                 } else if (!rs->need_delete_file()) {
@@ -1103,6 +1102,7 @@ void StorageEngine::start_delete_unused_rowset() {
                 } else {
                     ++due_to_delayed_expired_ts;
                 }
+                ++it;
             }
         }
     }


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

Reply via email to