File tree Expand file tree Collapse file tree 1 file changed +6
-19
lines changed
Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -427,25 +427,12 @@ bool CompactionMixin::handle_ordered_data_compaction() {
427427 return false ;
428428 }
429429
430- // If some rowsets has idx files and some rowsets has not, we can not do link file compaction.
431- // Since the output rowset will be broken.
432-
433- // Use schema version instead of schema hash to check if they are the same,
434- // because light schema change will not change the schema hash on BE, but will increase the schema version
435- // See fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java::2979
436- std::vector<int32_t > schema_versions_of_rowsets;
437-
438- for (auto input_rowset : _input_rowsets) {
439- schema_versions_of_rowsets.push_back (input_rowset->rowset_meta ()->schema_version ());
440- }
441-
442- // If all rowsets has same schema version, then we can do link file compaction directly.
443- bool all_same_schema_version =
444- std::all_of (schema_versions_of_rowsets.begin (), schema_versions_of_rowsets.end (),
445- [&](int32_t v) { return v == schema_versions_of_rowsets.front (); });
446-
447- if (!all_same_schema_version) {
448- return false ;
430+ // Skip ordered data compaction if any rowset has inverted/ann index.
431+ for (auto & rowset : _input_rowsets) {
432+ const auto & meta = rowset->rowset_meta ();
433+ if (meta->tablet_schema ()->has_inverted_index () || meta->tablet_schema ()->has_ann_index ()) {
434+ return false ;
435+ }
449436 }
450437
451438 if (compaction_type () == ReaderType::READER_COLD_DATA_COMPACTION ||
You can’t perform that action at this time.
0 commit comments