This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 624d9ee5a69 [fix](create table) Add hit err msg when create table all
be on same … (#34361)
624d9ee5a69 is described below
commit 624d9ee5a696b11dd3ff95d9bc27080fd455432f
Author: deardeng <[email protected]>
AuthorDate: Sat May 4 09:39:07 2024 +0800
[fix](create table) Add hit err msg when create table all be on same …
(#34361)
---
.../src/main/java/org/apache/doris/system/SystemInfoService.java | 3 ++-
.../src/test/java/org/apache/doris/catalog/CreateTableTest.java | 6 ++++--
.../src/test/java/org/apache/doris/catalog/ModifyBackendTest.java | 6 ++++--
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
b/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
index 9580656d7c5..ca8885b5530 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
@@ -552,7 +552,8 @@ public class SystemInfoService {
if (!failedEntries.isEmpty()) {
String failedMsg = Joiner.on("\n").join(failedEntries);
throw new DdlException("Failed to find enough backend, please
check the replication num,"
- + "replication tag and storage medium and avail
capacity of backends.\n"
+ + "replication tag and storage medium and avail
capacity of backends "
+ + "or maybe all be on same host.\n"
+ "Create failed replications:\n" + failedMsg);
}
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java
b/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java
index 0c73fee2319..8a7b5051ec7 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java
@@ -279,7 +279,8 @@ public class CreateTableTest extends TestWithFeService {
ConfigBase.setMutableConfig("disable_storage_medium_check", "false");
ExceptionChecker
.expectThrowsWithMsg(DdlException.class,
- "Failed to find enough backend, please check the
replication num,replication tag and storage medium and avail capacity of
backends.\n"
+ "Failed to find enough backend, please check the
replication num,replication tag and storage medium and avail capacity of
backends "
+ + "or maybe all be on same host.\n"
+ "Create failed replications:\n"
+ "replication tag: {\"location\" :
\"default\"}, replication num: 1, storage medium: SSD",
() -> createTable(
@@ -288,7 +289,8 @@ public class CreateTableTest extends TestWithFeService {
ExceptionChecker
.expectThrowsWithMsg(DdlException.class,
- "Failed to find enough backend, please check the
replication num,replication tag and storage medium and avail capacity of
backends.\n"
+ "Failed to find enough backend, please check the
replication num,replication tag and storage medium and avail capacity of
backends "
+ + "or maybe all be on same host.\n"
+ "Create failed replications:\n"
+ "replication tag: {\"location\" :
\"default\"}, replication num: 1, storage medium: SSD",
() -> createTable("create table test.tb7_1(key1 int,
key2 varchar(10))\n"
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/catalog/ModifyBackendTest.java
b/fe/fe-core/src/test/java/org/apache/doris/catalog/ModifyBackendTest.java
index ca4a658c4d3..a0575eff548 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/catalog/ModifyBackendTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/ModifyBackendTest.java
@@ -82,7 +82,8 @@ public class ModifyBackendTest {
+ "buckets 3 properties(\n" + "\"replication_num\" = \"1\"\n"
+ ");";
CreateTableStmt createStmt = (CreateTableStmt)
UtFrameUtils.parseAndAnalyzeStmt(createStr, connectContext);
ExceptionChecker.expectThrowsWithMsg(DdlException.class,
- "Failed to find enough backend, please check the replication
num,replication tag and storage medium and avail capacity of backends.\n"
+ "Failed to find enough backend, please check the replication
num,replication tag and storage medium and avail capacity of backends "
+ + "or maybe all be on same host.\n"
+ "Create failed replications:\n"
+ "replication tag: {\"location\" : \"default\"},
replication num: 1, storage medium: HDD",
() -> DdlExecutor.execute(Env.getCurrentEnv(), createStmt));
@@ -153,7 +154,8 @@ public class ModifyBackendTest {
+ " set ('replication_allocation' = 'tag.location.zonex:1')";
ExceptionChecker.expectThrowsWithMsg(AnalysisException.class, "errCode
= 2, detailMessage = "
+ "errCode = 2, detailMessage = Failed to find enough
backend, "
- + "please check the replication num,replication tag
and storage medium and avail capacity of backends.\n"
+ + "please check the replication num,replication tag
and storage medium and avail capacity of backends "
+ + "or maybe all be on same host.\n"
+ "Create failed replications:\n"
+ "replication tag: {\"location\" : \"zonex\"},
replication num: 1, storage medium: null",
() -> UtFrameUtils.parseAndAnalyzeStmt(wrongAlterStr,
connectContext));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]