You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2019/12/29 14:28:00 UTC
[jira] [Created] (HDDS-2820) OM Ratis dir creation may fail
Attila Doroszlai created HDDS-2820:
--------------------------------------
Summary: OM Ratis dir creation may fail
Key: HDDS-2820
URL: https://issues.apache.org/jira/browse/HDDS-2820
Project: Hadoop Distributed Data Store
Issue Type: Bug
Components: Ozone Manager
Reporter: Attila Doroszlai
Assignee: Attila Doroszlai
OM Ratis dir creation is attempted from 2 threads:
# Ratis server initializes storage dir in async CompletableFuture
# OM init directly creates it
The latter may encounter the following exception:
{code}
java.lang.IllegalArgumentException: Unable to create path: /github/workspace/hadoop-ozone/integration-test/target/test-dir/MiniOzoneClusterImpl-bdc6aaad-da50-4196-ab1e-80aad183d7b2/omNode-2/ratis
at org.apache.hadoop.ozone.OmUtils.createOMDir(OmUtils.java:493)
at org.apache.hadoop.ozone.om.OzoneManager.<init>(OzoneManager.java:426)
at org.apache.hadoop.ozone.om.OzoneManager.createOm(OzoneManager.java:862)
at org.apache.hadoop.ozone.MiniOzoneHAClusterImpl$Builder.createOMService(MiniOzoneHAClusterImpl.java:267)
at org.apache.hadoop.ozone.MiniOzoneHAClusterImpl$Builder.build(MiniOzoneHAClusterImpl.java:199)
{code}
at:
{code:title=https://github.com/apache/hadoop-ozone/blob/529438a28882b085d1095feccf6c7d6782a6a833/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java#L448-L454}
public static File createOMDir(String dirPath) {
File dirFile = new File(dirPath);
if (!dirFile.exists() && !dirFile.mkdirs()) {
throw new IllegalArgumentException("Unable to create path: " + dirFile);
}
return dirFile;
}
{code}
It may happen that {{exists()}} returns {{false}} because the dir is does not exists yet, but {{mkdirs()}} also returns {{false}} because the dir is created in the meantime by the Ratis thread.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org