This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new d0eed0ce738 Add error logs for NotEnoughDataNodeException and
DatabaseNotExistsException (#11832)
d0eed0ce738 is described below
commit d0eed0ce7380f87435e7e6e32202f12ad6993e19
Author: Yongzao <[email protected]>
AuthorDate: Wed Jan 3 21:59:11 2024 +0800
Add error logs for NotEnoughDataNodeException and
DatabaseNotExistsException (#11832)
---
.../iotdb/confignode/manager/partition/PartitionManager.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
index 0fc72a977d2..c61f13043a1 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
@@ -506,15 +506,13 @@ public class PartitionManager {
}
}
} catch (NotEnoughDataNodeException e) {
- String prompt = "ConfigNode failed to extend Region because there are
not enough DataNodes";
- LOGGER.error(prompt);
+ LOGGER.error(e.getMessage());
result.setCode(TSStatusCode.NO_ENOUGH_DATANODE.getStatusCode());
- result.setMessage(prompt);
+ result.setMessage(e.getMessage());
} catch (DatabaseNotExistsException e) {
- String prompt = "ConfigNode failed to extend Region because some
StorageGroup doesn't exist.";
- LOGGER.error(prompt);
+ LOGGER.error(e.getMessage());
result.setCode(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode());
- result.setMessage(prompt);
+ result.setMessage(e.getMessage());
}
return result;