dcapwell commented on code in PR #3743:
URL: https://github.com/apache/cassandra/pull/3743#discussion_r1887726662


##########
test/unit/org/apache/cassandra/io/filesystem/ListenableFileSystem.java:
##########
@@ -796,18 +832,30 @@ else if (mode == MapMode.READ_WRITE)
                     long pos = position;
                     try
                     {
-                        while (local.hasRemaining())
+                        // the channel could be closed... so always create a 
new channel to avoid this problem
+                        try (FileChannel channel = 
provider().newFileChannel(path, Set.of(StandardOpenOption.WRITE)))

Review Comment:
   I am finding cases where the journal file is deleted *before* we finish 
writing to it... which is fine from a FS point of view... so to better handle 
that without failing due to the channel being closed, I moved to always opening 
a new channel for the write... if the file doesn't exist we just no-op (which 
is the behavior on real FS anyways



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to