[
https://issues.apache.org/jira/browse/CASSANDRA-6283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14060475#comment-14060475
]
Chienyu Chen edited comment on CASSANDRA-6283 at 7/14/14 2:23 PM:
------------------------------------------------------------------
The issue reappeared in Windows 2012, but fine in Windows 2008 R2. Could
someone confirm it? It seemed to be related to clearSnapshot.
Running 2.0.9
ERROR [ValidationExecutor:3] 2014-07-13 17:24:28,631 CassandraDaemon.java (line
199) Exception in thread Thread[ValidationExecutor:3,1,main]
FSWriteError in
\cassandra\1\data\Commenter3\PostSource_Index\snapshots\3796e3c0-0aed-11e4-8d77-1f5ea6ee0a78\Commenter3-PostSource_Index-ic-21-Index.db
at
org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:122)
at
org.apache.cassandra.io.util.FileUtils.deleteRecursive(FileUtils.java:384)
at
org.apache.cassandra.io.util.FileUtils.deleteRecursive(FileUtils.java:380)
at
org.apache.cassandra.db.Directories.clearSnapshot(Directories.java:488)
at
org.apache.cassandra.db.ColumnFamilyStore.clearSnapshot(ColumnFamilyStore.java:1877)
at
org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:811)
at
org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:63)
at
org.apache.cassandra.db.compaction.CompactionManager$8.call(CompactionManager.java:398)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.FileSystemException:
\cassandra\1\data\Commenter3\PostSource_Index\snapshots\3796e3c0-0aed-11e4-8d77-1f5ea6ee0a78\Commenter3-PostSource_Index-ic-21-Index.db:
The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
at java.nio.file.Files.delete(Unknown Source)
at
org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:118)
... 12 more
was (Author: bamboo82):
The issue reappeared in Windows 2012, but fine in Windows 2008 R2. Could
someone confirm it?
Running 2.0.9
> Windows 7 data files kept 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: Windows, compaction
> Fix For: 3.0
>
> Attachments: 6283_StreamWriter_patch.txt, leakdetect.patch,
> neighbor-log.zip, root-log.zip, 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.2#6252)