You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/05/16 16:39:15 UTC

[incubator-doris] 05/17: [fix][compaction] Rowset::end_version null pointer(#9379)

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

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 7c20a8722f9d268284a9bfa4f8a979fd4f99164b
Author: Xinyi Zou <zo...@gmail.com>
AuthorDate: Fri May 6 14:40:08 2022 +0800

    [fix][compaction]  Rowset::end_version null pointer(#9379)
---
 be/src/olap/compaction.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index f0dc268570..35fce9be5c 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -134,7 +134,12 @@ OLAPStatus Compaction::do_compaction_impl(int64_t permits) {
     int64_t current_max_version;
     {
         ReadLock rdlock(_tablet->get_header_lock());
-        current_max_version = _tablet->rowset_with_max_version()->end_version();
+        RowsetSharedPtr max_rowset = _tablet->rowset_with_max_version();
+        if (max_rowset == nullptr) {
+            current_max_version = -1;
+        } else {
+            current_max_version = _tablet->rowset_with_max_version()->end_version();
+        }
     }
 
     LOG(INFO) << "succeed to do " << compaction_name() << ". tablet=" << _tablet->full_name()


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