Skip to content

Commit 635ed6b

Browse files
Revert "branch-4.0: [fix](compaction) Check schema version before ordered data compaction #59570" (#59661)
Reverts #59620
1 parent 539cc31 commit 635ed6b

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

be/src/olap/compaction.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
#include "io/fs/file_writer.h"
4848
#include "io/fs/remote_file_system.h"
4949
#include "io/io_common.h"
50-
#include "olap/collection_statistics.h"
5150
#include "olap/cumulative_compaction.h"
5251
#include "olap/cumulative_compaction_policy.h"
5352
#include "olap/cumulative_compaction_time_series_policy.h"
@@ -424,28 +423,6 @@ bool CompactionMixin::handle_ordered_data_compaction() {
424423
if (!config::enable_ordered_data_compaction) {
425424
return false;
426425
}
427-
428-
// If some rowsets has idx files and some rowsets has not, we can not do link file compaction.
429-
// Since the output rowset will be broken.
430-
431-
// Use schema version instead of schema hash to check if they are the same,
432-
// because light schema change will not change the schema hash on BE, but will increase the schema version
433-
// See fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java::2979
434-
std::vector<int32_t> schema_versions_of_rowsets;
435-
436-
for (auto input_rowset : _input_rowsets) {
437-
schema_versions_of_rowsets.push_back(input_rowset->rowset_meta()->schema_version());
438-
}
439-
440-
// If all rowsets has same schema version, then we can do link file compaction directly.
441-
bool all_same_schema_version =
442-
std::all_of(schema_versions_of_rowsets.begin(), schema_versions_of_rowsets.end(),
443-
[&](int32_t v) { return v == schema_versions_of_rowsets.front(); });
444-
445-
if (!all_same_schema_version) {
446-
return false;
447-
}
448-
449426
if (compaction_type() == ReaderType::READER_COLD_DATA_COMPACTION ||
450427
compaction_type() == ReaderType::READER_FULL_COMPACTION) {
451428
// The remote file system and full compaction does not support to link files.

be/src/olap/rowset/rowset_meta.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,6 @@ class RowsetMeta : public MetadataAdder<RowsetMeta> {
424424
RowsetMeta(const RowsetMeta&) = delete;
425425
RowsetMeta operator=(const RowsetMeta&) = delete;
426426

427-
int32_t schema_version() const { return _rowset_meta_pb.schema_version(); }
428-
429427
private:
430428
bool _deserialize_from_pb(std::string_view value);
431429

0 commit comments

Comments
 (0)