cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-8308) Windows: Commitlog access violations on unit tests
Date Wed, 10 Dec 2014 16:22:12 GMT


Joshua McKenzie updated CASSANDRA-8308:
    Attachment: 8308_v2.txt

v2 attached.  Good catch on truncate on nio - I misread the javadoc on that and also assumed
they were going for functional parity with RAF.setLength.

I couldn't find an analogue to RAF.setLength in nio; rather than creating a single byte ByteBuffer,
seeking to DD.getCommitLogSegmentSize(), writing that byte, and seeking back - I went ahead
and just used RAF.setLength to get our size and then used the FileChannel API to map it later
as it seems less prone to error and opening CLS isn't critical path.  If there's a cleaner
or more idiomatic way to do that in nio I'm all for it but I couldn't track it down.

I also added another call to CommitLog.instance.resetUnsafe in SchemaLoader before we attempt
to delete directories as it was failing to delete the memory-mapped files.  Not sure why it
worked in v1 but it definitely needs it now.

Lastly - while I 100% agree the os determination needs to be tightened up (see CASSANDRA-8452),
I'm not sure how that's related to this patch as none of the changes reference that.

> Windows: Commitlog access violations on unit tests
> --------------------------------------------------
>                 Key: CASSANDRA-8308
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Joshua McKenzie
>            Assignee: Joshua McKenzie
>            Priority: Minor
>              Labels: Windows
>             Fix For: 3.0
>         Attachments: 8308_v1.txt, 8308_v2.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 FAILED
> [junit] Test 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(
>     [junit]     at sun.nio.fs.WindowsException.rethrowAsIOException(
>     [junit]     at sun.nio.fs.WindowsException.rethrowAsIOException(
>     [junit]     at sun.nio.fs.WindowsFileSystemProvider.implDelete(
>     [junit]     at sun.nio.fs.AbstractFileSystemProvider.delete(
>     [junit]     at java.nio.file.Files.delete(
>     [junit]     at
> {noformat}

This message was sent by Atlassian JIRA

View raw message