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

Remove transient RandomAccessFile usage

    XMLWordPrintableJSON

Details

    Description

      There are a few places within the code base where we use a RandomAccessFile transiently to either grab fd's or channels for other operations. This is prone to access violations on Windows (see CASSANDRA-4050 and CASSANDRA-8709) - while these usages don't appear to be causing issues at this time there's no reason to keep them. The less RandomAccessFile usage in the code-base the more stable we'll be on Windows.

      SSTableReader.dropPageCache

      • Used to getFD, have FileChannel version

      FileUtils.truncate

      • Used to get file channel for channel truncate call. Only use is in index file close so channel truncation down-only is acceptable.

      MMappedSegmentedFile.createSegments

      • Used to get file channel for mapping.

      Keeping these in a single ticket as all three should be fairly trivial refactors.

      Attachments

        Issue Links

          Activity

            People

              stefania Stefania Alborghetti
              JoshuaMcKenzie Joshua McKenzie
              Stefania Alborghetti
              Joshua McKenzie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: