samueldlightfoot commented on code in PR #4178:
URL: https://github.com/apache/cassandra/pull/4178#discussion_r2658933351


##########
src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java:
##########
@@ -472,6 +475,9 @@ protected SSTableReader(Builder<?, ?> builder, Owner owner)
         this.sstableMetadata = builder.getStatsMetadata();
         this.header = builder.getSerializationHeader();
         this.dfile = builder.getDataFile();
+        this.directIOSupported = FileUtils.isDirectIOSupported(dfile.file())

Review Comment:
   On digging a little deeper, it's various flavours of filesystems such as 
virtual/in-memory and network which can either throw or return zero values.
   
     1. Virtual/In-Memory Filesystems: According to 
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/file/FileStore.html,
 the default implementation can throw UnsupportedOperationException 
     for non-local storage devices. Some virtual filesystems (like 
https://github.com/google/jimfs/issues/183) may not properly implement 
getBlockSize().
     2. POSIX Specification: Per the 
https://man7.org/linux/man-pages/man3/statvfs.3.html, "It is unspecified 
whether all members of the returned struct have meaningful values on all file 
systems."
     3. Network Filesystems: NFS and other network filesystems may return 
unreliable or zero values for block size in certain conditions, as 
https://access.redhat.com/solutions/18357.
   



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