You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Joshua McKenzie (JIRA)" <ji...@apache.org> on 2014/11/13 21:31:35 UTC

[jira] [Commented] (CASSANDRA-8308) Windows: Commitlog access violations on unit tests

    [ https://issues.apache.org/jira/browse/CASSANDRA-8308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14211250#comment-14211250 ] 

Joshua McKenzie commented on CASSANDRA-8308:
--------------------------------------------

This looks like a test-only artifact from schemaloader attempting to delete files that are opened as RAF in Windows which causes the error.  As done in CASSANDRA-4050, converting the CommitLogSegment to nio would resolve this deletion sharing issue, however we rely on having an integer FD for trySkipCache calls; I'm not seeing an immediate method to get a FileDescriptor for a FileChannel.  If I can track something down in that vein I'll pursue converting CommitLogSegment to nio so we can avoid potential future access violations.  If not, refactoring the AbstractCommitLogService to allow stopping and restarting (rather than relying on the ctor only for functionality) should allow us to better test that component.

> 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
>
>
> 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)