[
https://issues.apache.org/jira/browse/CASSANDRA-6283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13903609#comment-13903609
]
Joshua McKenzie edited comment on CASSANDRA-6283 at 2/17/14 11:59 PM:
----------------------------------------------------------------------
With -par on the test. Without -par I'm seeing the same errors you were seeing
above indicating that snapshots have open handles:
{code:title=Non-par|borderStyle=solid}
ERROR [ValidationExecutor:3] 2014-02-17 17:52:57,092 Validator.java (line 242)
Failed creating a merkle tree for [repair #99973cf0-982e-11e3-9370-639bcb1c8d6c
on Keyspace1/Standard1, (-390084131511610885,-345083722760460
251]], /10.193.84.101 (see log for details)
ERROR [ValidationExecutor:3] 2014-02-17 17:52:57,092 CassandraDaemon.java (line
192) Exception in thread Thread[ValidationExecutor:3,1,main]
FSWriteError in
\var\lib\cassandra\data\Keyspace1\Standard1\snapshots\99973cf0-982e-11e3-9370-639bcb1c8d6c\Keyspace1-Standard1-jb-37-Data.db
at
org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:120)
at
org.apache.cassandra.io.util.FileUtils.deleteRecursive(FileUtils.java:382)
at
org.apache.cassandra.io.util.FileUtils.deleteRecursive(FileUtils.java:378)
at
org.apache.cassandra.db.Directories.clearSnapshot(Directories.java:416)
at
org.apache.cassandra.db.ColumnFamilyStore.clearSnapshot(ColumnFamilyStore.java:1881)
at
org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:810)
at
org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:62)
at
org.apache.cassandra.db.compaction.CompactionManager$8.call(CompactionManager.java:397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.nio.file.FileSystemException:
\var\lib\cassandra\data\Keyspace1\Standard1\snapshots\99973cf0-982e-11e3-9370-639bcb1c8d6c\Keyspace1-Standard1-jb-37-Data.db:
The process cannot access the file because it is
being used by another process.
{code}
I want to confirm that repair w/-par on 2.0.5 doesn't give you much trouble, if
any, and then tackle -par vs. non separately.
was (Author: joshuamckenzie):
With -par on the test. Without -par I'm seeing the same errors you were seeing
above indicating that snapshots have open handles:
{code:title=Bar.java|borderStyle=solid}
ERROR [ValidationExecutor:3] 2014-02-17 17:52:57,092 Validator.java (line 242)
Failed creating a merkle tree for [repair #99973cf0-982e-11e3-9370-639bcb1c8d6c
on Keyspace1/Standard1, (-390084131511610885,-345083722760460
251]], /10.193.84.101 (see log for details)
ERROR [ValidationExecutor:3] 2014-02-17 17:52:57,092 CassandraDaemon.java (line
192) Exception in thread Thread[ValidationExecutor:3,1,main]
FSWriteError in
\var\lib\cassandra\data\Keyspace1\Standard1\snapshots\99973cf0-982e-11e3-9370-639bcb1c8d6c\Keyspace1-Standard1-jb-37-Data.db
at
org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:120)
at
org.apache.cassandra.io.util.FileUtils.deleteRecursive(FileUtils.java:382)
at
org.apache.cassandra.io.util.FileUtils.deleteRecursive(FileUtils.java:378)
at
org.apache.cassandra.db.Directories.clearSnapshot(Directories.java:416)
at
org.apache.cassandra.db.ColumnFamilyStore.clearSnapshot(ColumnFamilyStore.java:1881)
at
org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:810)
at
org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:62)
at
org.apache.cassandra.db.compaction.CompactionManager$8.call(CompactionManager.java:397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.nio.file.FileSystemException:
\var\lib\cassandra\data\Keyspace1\Standard1\snapshots\99973cf0-982e-11e3-9370-639bcb1c8d6c\Keyspace1-Standard1-jb-37-Data.db:
The process cannot access the file because it is
being used by another process.
{code}
I want to confirm that repair w/-par on 2.0.5 doesn't give you much trouble, if
any, and then tackle -par vs. non separately.
> Windows 7 data files keept open / can't be deleted after compaction.
> --------------------------------------------------------------------
>
> Key: CASSANDRA-6283
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6283
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Environment: Windows 7 (32) / Java 1.7.0.45
> Reporter: Andreas Schnitzerling
> Assignee: Joshua McKenzie
> Labels: compaction
> Fix For: 2.0.6
>
> Attachments: leakdetect.patch, screenshot-1.jpg, system.log
>
>
> Files cannot be deleted, patch CASSANDRA-5383 (Win7 deleting problem) doesn't
> help on Win-7 on Cassandra 2.0.2. Even 2.1 Snapshot is not running. The cause
> is: Opened file handles seem to be lost and not closed properly. Win 7
> blames, that another process is still using the file (but its obviously
> cassandra). Only restart of the server makes the files deleted. But after
> heavy using (changes) of tables, there are about 24K files in the data folder
> (instead of 35 after every restart) and Cassandra crashes. I experiminted and
> I found out, that a finalizer fixes the problem. So after GC the files will
> be deleted (not optimal, but working fine). It runs now 2 days continously
> without problem. Possible fix/test:
> I wrote the following finalizer at the end of class
> org.apache.cassandra.io.util.RandomAccessReader:
> {code:title=RandomAccessReader.java|borderStyle=solid}
> @Override
> protected void finalize() throws Throwable {
> deallocate();
> super.finalize();
> }
> {code}
> Can somebody test / develop / patch it? Thx.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)