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

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

commit 32da525560a76bb621593e59131321fab0f0ab79
Author: Mingyu Chen <morningman....@gmail.com>
AuthorDate: Sat Mar 12 23:12:52 2022 +0800

    [fix] BE crash when reporting tablet (#8453)
    
    this bug was introduced from #8209
---
 be/src/olap/tablet.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index 862dccb..cd016e6 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -833,7 +833,8 @@ void 
Tablet::_max_continuous_version_from_beginning_unlocked(Version* version, V
         max_continuous_version = existing_versions[i];
     }
     *version = max_continuous_version;
-    if (max_version != nullptr) {
+    // tablet may not has rowset, eg, tablet has just been clear for restore.
+    if (max_version != nullptr && !existing_versions.empty()) {
         *max_version = existing_versions.back();
     }
 }

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

Reply via email to