cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conan Cook <>
Subject Failing to delete commitlog at startup/shutdown (Windows)
Date Mon, 23 Apr 2012 14:41:23 GMT

I'm experiencing a problem running a suite of integration tests on Windows
7, using Cassandra 1.0.9 and Java 1.6.0_31.  A new cassandra instance is
spun up for each test class and shut down afterwards, using the Maven
Failsafe plugin.  The problem is that the Commitlog file seems to be kept
open, and so subsequent test classes fail to delete it.  Here is the stack
trace: Failed to delete

I've tried to delete the file when shutting down Cassandra and before
firing up a new one.  I've tried setting the failsafe plugin's forkMode to
both "once" and "always", so that it fires up a new JVM for each test or a
single JVM for all tests; the results are similar.  Debugging through the
code takes me right down to the native method call in the windows
filesystem class in the JVM, and an access denied error is returned; I'm
also unable to delete it manually through Windows Explorer or a terminal
window at that point (with the JVM suspended), and running Process Explorer
indicates that a Java process has a handle open to that file.

I've read a number of posts and mails mentioning this problem and there is
a JIRA saying a similar problem is fixed (  I've tried a number
of things to clean up the Commitlog file after each test is complete, and
have followed the recommendations made here (I'm also using Hector's
EmbeddedServerHelper to start/stop Cassandra):

Does anyone have any ideas on how to avoid this issue?  I don't have any
way of knowing what it is that's holding onto this file other than a Java



View raw message