This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 29354d4a66a824a8f5ffa1bec0ea5b873bd44969 Author: Clebert Suconic <[email protected]> AuthorDate: Wed Dec 4 09:06:56 2024 -0500 ARTEMIS-5199 Fixing race on create directory for shared storage This is fixing SharedStoreDistributionTest --- .../artemis/core/persistence/impl/journal/JournalStorageManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java index 827cc5ff89..95499e75e6 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java @@ -715,7 +715,7 @@ public class JournalStorageManager extends AbstractJournalStorageManager { private void checkAndCreateDir(final File dir, final boolean create) { if (!dir.exists()) { if (create) { - if (!dir.mkdirs()) { + if (!dir.mkdirs() && !dir.exists()) { throw new IllegalStateException("Failed to create directory " + dir); } } else { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
