diff --git a/fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java b/fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java index 075772b929f78b..e9d4e3c33acedc 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java +++ b/fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java @@ -443,6 +443,11 @@ private void checkCreatePartitions(long dbId, long tableId, List partition private void preparePartition(long dbId, long tableId, List partitionIds, List indexIds) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip prepare partition in checking compatibility mode"); + return; + } + Cloud.PartitionRequest.Builder partitionRequestBuilder = Cloud.PartitionRequest.newBuilder(); partitionRequestBuilder.setCloudUniqueId(Config.cloud_unique_id); partitionRequestBuilder.setTableId(tableId); @@ -479,6 +484,11 @@ private void preparePartition(long dbId, long tableId, List partitionIds, private void commitPartition(long dbId, long tableId, List partitionIds, List indexIds) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip committing partitions in check compatibility mode"); + return; + } + Cloud.PartitionRequest.Builder partitionRequestBuilder = Cloud.PartitionRequest.newBuilder(); partitionRequestBuilder.setCloudUniqueId(Config.cloud_unique_id); partitionRequestBuilder.addAllPartitionIds(partitionIds); @@ -512,6 +522,11 @@ private void commitPartition(long dbId, long tableId, List partitionIds, L // if `expiration` = 0, recycler will delete uncommitted indexes in `retention_seconds` public void prepareMaterializedIndex(Long tableId, List indexIds, long expiration) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip prepare materialized index in checking compatibility mode"); + return; + } + Cloud.IndexRequest.Builder indexRequestBuilder = Cloud.IndexRequest.newBuilder(); indexRequestBuilder.setCloudUniqueId(Config.cloud_unique_id); indexRequestBuilder.addAllIndexIds(indexIds); @@ -544,6 +559,11 @@ public void prepareMaterializedIndex(Long tableId, List indexIds, long exp public void commitMaterializedIndex(long dbId, long tableId, List indexIds, boolean isCreateTable) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip committing materialized index in checking compatibility mode"); + return; + } + Cloud.IndexRequest.Builder indexRequestBuilder = Cloud.IndexRequest.newBuilder(); indexRequestBuilder.setCloudUniqueId(Config.cloud_unique_id); indexRequestBuilder.addAllIndexIds(indexIds); @@ -577,6 +597,11 @@ public void commitMaterializedIndex(long dbId, long tableId, List indexIds private void checkPartition(long dbId, long tableId, List partitionIds) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip checking partitions in checking compatibility mode"); + return; + } + Cloud.CheckKeyInfos.Builder checkKeyInfosBuilder = Cloud.CheckKeyInfos.newBuilder(); checkKeyInfosBuilder.addAllPartitionIds(partitionIds); // for ms log @@ -612,6 +637,11 @@ private void checkPartition(long dbId, long tableId, List partitionIds) public void checkMaterializedIndex(long dbId, long tableId, List indexIds) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip checking materialized index in checking compatibility mode"); + return; + } + Cloud.CheckKeyInfos.Builder checkKeyInfosBuilder = Cloud.CheckKeyInfos.newBuilder(); checkKeyInfosBuilder.addAllIndexIds(indexIds); // for ms log @@ -775,6 +805,11 @@ public void erasePartitionDropBackendReplicas(List partitions) { private void dropCloudPartition(long dbId, long tableId, List partitionIds, List indexIds, boolean needUpdateTableVersion) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip dropping cloud partitions in checking compatibility mode"); + return; + } + Cloud.PartitionRequest.Builder partitionRequestBuilder = Cloud.PartitionRequest.newBuilder(); partitionRequestBuilder.setCloudUniqueId(Config.cloud_unique_id); @@ -811,6 +846,11 @@ private void dropCloudPartition(long dbId, long tableId, List partitionIds } public void dropMaterializedIndex(long tableId, List indexIds, boolean dropTable) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip dropping materialized index in compatibility checking mode"); + return; + } + Cloud.IndexRequest.Builder indexRequestBuilder = Cloud.IndexRequest.newBuilder(); indexRequestBuilder.setCloudUniqueId(Config.cloud_unique_id); indexRequestBuilder.addAllIndexIds(indexIds); @@ -966,6 +1006,11 @@ private void unprotectUpdateCloudReplica(OlapTable olapTable, UpdateCloudReplica } public void createStage(Cloud.StagePB stagePB, boolean ifNotExists) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip creating stage in checking compatibility mode"); + return; + } + Cloud.CreateStageRequest createStageRequest = Cloud.CreateStageRequest.newBuilder() .setCloudUniqueId(Config.cloud_unique_id).setStage(stagePB).build(); Cloud.CreateStageResponse response = null; @@ -1099,6 +1144,11 @@ private Cloud.GetStageResponse getStageRpc(Cloud.StagePB.StageType stageType, St public void dropStage(Cloud.StagePB.StageType stageType, String userName, String userId, String stageName, String reason, boolean ifExists) throws DdlException { + if (Config.enable_check_compatibility_mode) { + LOG.info("skip dropping stage in checking compatibility mode"); + return; + } + Cloud.DropStageRequest.Builder builder = Cloud.DropStageRequest.newBuilder() .setCloudUniqueId(Config.cloud_unique_id).setType(stageType); if (userName != null) {