[
https://issues.apache.org/jira/browse/CASSANDRA-20819?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Miklosovic updated CASSANDRA-20819:
------------------------------------------
Status: Ready to Commit (was: Review In Progress)
> ThreadLocalReadAheadBufferTest fails with FileNotFound exception when
> -Djava.io.tmpdir set to /tmp
> --------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-20819
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20819
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Test/unit
> Reporter: Isaac Reath
> Assignee: Isaac Reath
> Priority: Normal
> Fix For: 5.0.x, 6.x
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When running ThreadLocalReadAheadBufferTest, I found that the test will fail
> with the following error if -[Djava.io|http://djava.io/].tmpdir is set to any
> directory without a trailing slash whose parent is not writable (e.g. /tmp).
> This happens because when we construct the path, we simply just append tmpdir
> to the filename
> ([https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/ThreadLocalReadAheadBufferTest.java#L180]).
> This produces the following error:
> {code:java}
> java.lang.RuntimeException: java.io.FileNotFoundException:
> /tmpdata+90912743.bin (Read-only file system)
> at
> org.apache.cassandra.io.util.ThreadLocalReadAheadBufferTest.writeFile(ThreadLocalReadAheadBufferTest.java:200)
> at
> org.apache.cassandra.io.util.ThreadLocalReadAheadBufferTest.setup(ThreadLocalR...
> {code}
> By switching to using a File(parent, filename) constructor we can support
> both with and without a trailing slash.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]