@@ -412,16 +412,19 @@ Status SegmentWriter::append_block_with_partial_content(const vectorized::Block*
412
412
{
413
413
std::shared_lock rlock (tablet->get_header_lock ());
414
414
specified_rowsets = tablet->get_rowset_by_ids (&_mow_context->rowset_ids );
415
- if (specified_rowsets.size () != _mow_context->rowset_ids .size ()) {
415
+ if (_opts.rowset_ctx ->partial_update_info ->is_strict_mode &&
416
+ specified_rowsets.size () != _mow_context->rowset_ids .size ()) {
417
+ // Only when this is a strict mode partial update that missing rowsets here will lead to problems.
418
+ // In other case, the missing rowsets will be calculated in later phases(commit phase/publish phase)
416
419
LOG (WARNING) << fmt::format (
417
420
" [Memtable Flush] some rowsets have been deleted due to "
418
- " compaction(specified_rowsets.size()={}, but rowset_ids.size()={}), reset "
419
- " rowset_ids to the latest value. tablet_id: {}, cur max_version: {}, "
420
- " transaction_id: {}" ,
421
- specified_rowsets.size (), _mow_context->rowset_ids .size (), tablet->tablet_id (),
421
+ " compaction(specified_rowsets.size()={}, but rowset_ids.size()={}) in strict "
422
+ " mode partial update. tablet_id: {}, cur max_version: {}, transaction_id: {}" ,
423
+ specified_rowsets.size (), _mow_context->rowset_ids .size (), _tablet->tablet_id (),
422
424
_mow_context->max_version , _mow_context->txn_id );
423
425
return Status::InternalError<false >(
424
- " [Memtable Flush] some rowsets have been deleted due to compaction" );
426
+ " [Memtable Flush] some rowsets have been deleted due to "
427
+ " compaction in strict mode partial update" );
425
428
}
426
429
}
427
430
std::vector<std::unique_ptr<SegmentCacheHandle>> segment_caches (specified_rowsets.size ());
0 commit comments