This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 2348b5b23 [core] add check for make directory for db location when
creating database (#4399)
2348b5b23 is described below
commit 2348b5b230f3cf6bc893fe335bb5bd3769baaf3b
Author: FANNG <[email protected]>
AuthorDate: Tue Oct 29 16:25:53 2024 +0800
[core] add check for make directory for db location when creating database
(#4399)
---
.../main/java/org/apache/paimon/catalog/FileSystemCatalog.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git
a/paimon-core/src/main/java/org/apache/paimon/catalog/FileSystemCatalog.java
b/paimon-core/src/main/java/org/apache/paimon/catalog/FileSystemCatalog.java
index 14b4d1718..9be9db653 100644
--- a/paimon-core/src/main/java/org/apache/paimon/catalog/FileSystemCatalog.java
+++ b/paimon-core/src/main/java/org/apache/paimon/catalog/FileSystemCatalog.java
@@ -70,7 +70,14 @@ public class FileSystemCatalog extends AbstractCatalog {
"Currently filesystem catalog can't store database
properties, discard properties: {}",
properties);
}
- uncheck(() -> fileIO.mkdirs(newDatabasePath(name)));
+
+ Path databasePath = newDatabasePath(name);
+ if (!uncheck(() -> fileIO.mkdirs(databasePath))) {
+ throw new RuntimeException(
+ String.format(
+ "Create database location failed, " + "database:
%s, location: %s",
+ name, databasePath));
+ }
}
@Override