[ https://issues.apache.org/jira/browse/CASSANDRA-6283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13920811#comment-13920811 ]
Andreas Schnitzerling commented on CASSANDRA-6283: -------------------------------------------------- Hello, since I don't know all code areas of C*, I describe, what I tested to reproduce: I cleaned system.log and used again C* 2.0.5-rel with LEAK detection and finalizer-patch in RAR.java. After starting again C* w/o doing anything I got a lot LEAK messages. I waited until C* finished his own work (mainly compacting I think). Now I started repair -par. Result are a lot of LEAK messages. Here the first one: {panel:title=nodetool repair -par events} ERROR [Finalizer] 2014-03-05 13:45:25,932 RandomAccessReader.java (line 394) LEAK finalizer had to clean up java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbyproject\events-eventsbyproject-jb-2002-Index.db allocated at org.apache.cassandra.io.util.RandomAccessReader.<init>(RandomAccessReader.java:63) at org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:103) at org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:90) at org.apache.cassandra.io.util.BufferedPoolingSegmentedFile.createReader(BufferedPoolingSegmentedFile.java:45) at org.apache.cassandra.io.util.PoolingSegmentedFile.getSegment(PoolingSegmentedFile.java:39) at org.apache.cassandra.io.util.SegmentedFile$SegmentIterator.next(SegmentedFile.java:162) at org.apache.cassandra.io.util.SegmentedFile$SegmentIterator.next(SegmentedFile.java:143) at org.apache.cassandra.io.sstable.SSTableReader.getPosition(SSTableReader.java:936) at org.apache.cassandra.io.sstable.SSTableReader.getPosition(SSTableReader.java:871) at org.apache.cassandra.io.sstable.SSTableReader.getPositionsForRanges(SSTableReader.java:783) at org.apache.cassandra.io.sstable.SSTableReader.getScanner(SSTableReader.java:1186) at org.apache.cassandra.io.sstable.SSTableReader.getScanner(SSTableReader.java:1174) at org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:252) at org.apache.cassandra.db.compaction.CompactionManager$ValidationCompactionIterable.<init>(CompactionManager.java:888) at org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:787) 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(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) {panel} If I can make more tests, let me know. After Thursday I will be on holiday for 3 weeks and in office again at Mon, 03/31/2014. > 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: 6283_StreamWriter_patch.txt, 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.2#6252)