[fix](cloud) ignore some case in cloud mode (#32261)

This commit is contained in:
yujun
2024-03-15 16:53:32 +08:00
committed by yiguolei
parent 9c1888e7ec
commit c0776c7c07
4 changed files with 16 additions and 0 deletions

View File

@ -19,6 +19,7 @@ package org.apache.doris.catalog;
import org.apache.doris.analysis.AlterColocateGroupStmt;
import org.apache.doris.clone.ColocateTableCheckerAndBalancer;
import org.apache.doris.common.Config;
import org.apache.doris.common.DdlException;
import org.apache.doris.common.FeMetaVersion;
import org.apache.doris.common.MetaNotFoundException;
@ -845,6 +846,10 @@ public class ColocateTableIndex implements Writable {
if (properties.containsKey(PropertyAnalyzer.PROPERTIES_REPLICATION_NUM)
|| properties.containsKey(PropertyAnalyzer.PROPERTIES_REPLICATION_ALLOCATION)) {
if (Config.isCloudMode()) {
throw new DdlException("Cann't modify colocate group replication in cloud mode");
}
ReplicaAllocation replicaAlloc = PropertyAnalyzer.analyzeReplicaAllocation(properties, "");
Preconditions.checkState(!replicaAlloc.isNotSet());
Env.getCurrentSystemInfo().checkReplicaAllocation(replicaAlloc);

View File

@ -16,6 +16,9 @@
// under the License.
suite ("test_alter_colocate_table") {
if (isCloudMode()) {
return
}
def tbls = ["col_tbl1", "col_tbl2", "col_tbl3"]
for (def tbl : tbls) {
sql """

View File

@ -16,6 +16,10 @@
// under the License.
suite('test_disk_health', 'p0,p1,p2') {
if (isCloudMode()) {
return
}
def backends = sql_return_maparray "SHOW PROC '/backends'"
backends.each { be ->
def disks = sql_return_maparray "SHOW PROC '/backends/${be.BackendId}'"

View File

@ -18,6 +18,10 @@
import org.apache.doris.regression.suite.ClusterOptions
suite('test_storage_medium_has_disk') {
if (isCloudMode()) {
return
}
def checkPartitionMedium = { table, isHdd ->
def partitions = sql_return_maparray "SHOW PARTITIONS FROM ${table}"
assertTrue(partitions.size() > 0)