You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2023/06/29 02:10:40 UTC

[doris] branch master updated: [fix](gc_binlog) Fix tablet gc_binlogs nullptr (#21158)

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

dataroaring 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 3f99b91ddf [fix](gc_binlog) Fix tablet gc_binlogs nullptr (#21158)
3f99b91ddf is described below

commit 3f99b91ddf3ffce9aa578f2cfb915824f3bcb7e8
Author: Jack Drogon <ja...@gmail.com>
AuthorDate: Thu Jun 29 10:10:33 2023 +0800

    [fix](gc_binlog) Fix tablet gc_binlogs nullptr (#21158)
---
 be/src/olap/storage_engine.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/be/src/olap/storage_engine.cpp b/be/src/olap/storage_engine.cpp
index d10c11b1c2..60b0b023c6 100644
--- a/be/src/olap/storage_engine.cpp
+++ b/be/src/olap/storage_engine.cpp
@@ -776,7 +776,11 @@ void StorageEngine::gc_binlogs(const std::unordered_map<int64_t, int64_t>& gc_ta
         LOG(INFO) << fmt::format("start to gc binlogs for tablet_id: {}, version: {}", tablet_id,
                                  version);
 
-        TabletSharedPtr tablet = StorageEngine::instance()->tablet_manager()->get_tablet(tablet_id);
+        TabletSharedPtr tablet = _tablet_manager->get_tablet(tablet_id);
+        if (tablet == nullptr) {
+            LOG(WARNING) << fmt::format("tablet_id: {} not found", tablet_id);
+            continue;
+        }
         tablet->gc_binlogs(version);
     }
 }


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