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


##########
src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java:
##########
@@ -1064,12 +1070,17 @@ public ISSTableScanner getScanner(Range<Token> range)
      * @return A Scanner over the full content of the SSTable.
      */
     public ISSTableScanner getScanner()
+    {
+        return getScanner(dfile.diskAccessMode());
+    }
+
+    public ISSTableScanner getScanner(DiskAccessMode diskAccessMode)
     {
         PartitionPositionBounds fullRange = getPositionsForFullRange();
         if (fullRange != null)
-            return new SSTableSimpleScanner(this, 
Collections.singletonList(fullRange));
+            return new SSTableSimpleScanner(this, 
Collections.singletonList(fullRange), diskAccessMode);

Review Comment:
   Not if the disk access mode we want to use for the scan is different to the 
default (non-scan) disk access mode of the data file (dFile).
   
   I originally played with the idea of having another FileHandle on the 
SSTableReader specifically for scans, but since we currently only support 
**compaction** scans using a different disk access mode (for now) it didn't 
work particularly well (and creates a permanent fd rather than ephemeral for 
the lifetime of the scan).



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