Skip to content

Commit

Permalink
[core] add check for make directory for db location when creating dat…
Browse files Browse the repository at this point in the history
…abase (#4399)
  • Loading branch information
FANNG1 authored Oct 29, 2024
1 parent 69390bd commit 2348b5b
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ protected void createDatabaseImpl(String name, Map<String, String> properties) {
"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
Expand Down

0 comments on commit 2348b5b

Please sign in to comment.