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 Mon, 17 Nov 2014 23:30:33 GMT


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

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