Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-6283

Windows 7 data files kept open / can't be deleted after compaction.

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Normal

    Description

      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:

      RandomAccessReader.java
      @Override
      protected void finalize() throws Throwable {
      	deallocate();
      	super.finalize();
      }
      

      Can somebody test / develop / patch it? Thx.

      Attachments

        1. screenshot-1.jpg
          400 kB
          Andreas Schnitzerling
        2. system.log
          3 kB
          Andreas Schnitzerling
        3. leakdetect.patch
          2 kB
          graham sanderson
        4. 6283_StreamWriter_patch.txt
          0.5 kB
          Joshua McKenzie
        5. root-log.zip
          1.17 MB
          Andreas Schnitzerling
        6. neighbor-log.zip
          338 kB
          Andreas Schnitzerling

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            JoshuaMcKenzie Joshua McKenzie Assign to me
            Andie78 Andreas Schnitzerling
            Joshua McKenzie
            Jonathan Ellis
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment