You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2013/11/26 20:08:36 UTC
[jira] [Commented] (MESOS-848) Temp file leak in
ZooKeeperTestServer
[ 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)