diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp index 2b495807cd..e48ca02f78 100644 --- a/be/src/olap/tablet.cpp +++ b/be/src/olap/tablet.cpp @@ -674,16 +674,8 @@ void Tablet::calculate_cumulative_point() { // There is a hole, do not continue break; } - // break the loop if segments in this rowset is overlapping, or overlap flag is NOT NONOVERLAPPING - // even if is_segments_overlapping() return false, the overlap flag may be OVERLAPPING. - // eg: tablet with versions(rowsets): - // [0-1] NONOVERLAPPING - // [2-2] OVERLAPPING - // [2-2]'s overlap flag is OVERLAPPING because it is newly written by the delta writer. - // but is has only one segment, so is_segments_overlapping() will return false. - // but we should not continue increasing the cumulative point, because we need - // the compaction process to change the overlap flag from OVERLAPPING to NONOVERLAPPING. - if (rs->is_segments_overlapping() || rs->segments_overlap() != NONOVERLAPPING) { + // break the loop if segments in this rowset is overlapping, or is a singleton. + if (rs->is_segments_overlapping() || rs->is_singleton_delta()) { _cumulative_point = rs->version().first; break; }