[
https://issues.apache.org/jira/browse/MESOS-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13832898#comment-13832898
]
Jie Yu commented on MESOS-848:
------------------------------
This bug may lead to a failure of the following check
CHECK_SOME(directory): too many links
> Temp file leak in ZooKeeperTestServer
> -------------------------------------
>
> Key: MESOS-848
> URL: https://issues.apache.org/jira/browse/MESOS-848
> Project: Mesos
> Issue Type: Bug
> Reporter: Jie Yu
>
> Temp directories are not properly cleaned. We rely on
> java::io::File.deleteOnExit() to cleanup the temp directory. However, we do
> not properly cleanup the JVM instance even if gtest exits, leaving the temp
> directory uncleaned.
> ZooKeeperTestServer::ZooKeeperTestServer()
> : zooKeeperServer(NULL),
> connectionFactory(NULL),
> port(0),
> started(false)
> {
> // Create temporary directories for the FileTxnSnapLog.
> Try<std::string> directory = os::mkdtemp();
> CHECK_SOME(directory);
> java::io::File dataDir(directory.get());
> dataDir.deleteOnExit();
> directory = os::mkdtemp();
> CHECK_SOME(directory);
> java::io::File snapDir(directory.get());
> snapDir.deleteOnExit();
> zooKeeperServer = new ZooKeeperServer(
> FileTxnSnapLog(dataDir, snapDir),
> ZooKeeperServer::BasicDataTreeBuilder());
> }
--
This message was sent by Atlassian JIRA
(v6.1#6144)