[
https://issues.apache.org/jira/browse/CASSANDRA-8308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joshua McKenzie updated CASSANDRA-8308:
---------------------------------------
Attachment: 8308_v1.txt
# Swapped to FileChannel on CommitLogSegment
# Use reflection to grab FD out of it to use in trySkipCache (new method in
CLibrary)
# Added clibrary method for strerror
# Added logger warning on non-0 result from trySkipCache w/error message
# Tweaked logic on SchemaLoader to recursively delete contents of commitlog
folder rather than the folder itself
This fixes 3 of the 4 unit tests above; SSTableRewriterTest assumes that when a
sstable is successfully deleted it won't be present in the filesystem, however
on Windows when you delete a file with FILE_SHARE_DELETE and something else
still has a handle to the file, it stays in its original location on the drive
rather than getting removed and a link preserved in the /proc filesystem. I'll
open another ticket to make the SSTableRewriter tests more multi-platform
friendly.
The warning on trySkipCache has uncovered that we have invalid fd references on
our trySkipCache calls in SSTR.cloneWithNewStart - I haven't dug into it yet
but it might be an ordering issue where a file's deleted before we
posix_fadvise it.
> Windows: Commitlog access violations on unit tests
> --------------------------------------------------
>
> Key: CASSANDRA-8308
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8308
> Project: Cassandra
> Issue Type: Bug
> Reporter: Joshua McKenzie
> Assignee: Joshua McKenzie
> Priority: Minor
> Labels: Windows
> Fix For: 3.0
>
> Attachments: 8308_v1.txt
>
>
> We have four unit tests failing on trunk on Windows, all with
> FileSystemException's related to the SchemaLoader:
> {noformat}
> [junit] Test
> org.apache.cassandra.db.compaction.DateTieredCompactionStrategyTest FAILED
> [junit] Test org.apache.cassandra.cql3.ThriftCompatibilityTest FAILED
> [junit] Test org.apache.cassandra.io.sstable.SSTableRewriterTest FAILED
> [junit] Test org.apache.cassandra.repair.LocalSyncTaskTest FAILED
> {noformat}
> Example error:
> {noformat}
> [junit] Caused by: java.nio.file.FileSystemException:
> build\test\cassandra\commitlog;0\CommitLog-5-1415908745965.log: The process
> cannot access the file because it is being used by another process.
> [junit]
> [junit] at
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
> [junit] at
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
> [junit] at
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
> [junit] at
> sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
> [junit] at
> sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
> [junit] at java.nio.file.Files.delete(Files.java:1079)
> [junit] at
> org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:125)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)