jacek-lewandowski commented on code in PR #2064:
URL: https://github.com/apache/cassandra/pull/2064#discussion_r1072258870


##########
src/java/org/apache/cassandra/io/sstable/format/SSTableReaderBuilder.java:
##########
@@ -395,12 +393,13 @@ void load(boolean recreateBloomFilter,
                   StatsMetadata statsMetadata,
                   Set<Component> components) throws IOException
         {
-            try (FileHandle.Builder ibuilder = new 
FileHandle.Builder(descriptor.filenameFor(Component.PRIMARY_INDEX))
-                                               
.mmapped(DatabaseDescriptor.getIndexAccessMode() == Config.DiskAccessMode.mmap)
-                                               
.withChunkCache(ChunkCache.instance);
-                 FileHandle.Builder dbuilder = new 
FileHandle.Builder(descriptor.filenameFor(Component.DATA)).mmapped(DatabaseDescriptor.getDiskAccessMode()
 == Config.DiskAccessMode.mmap)
-                                                                               
                              .withChunkCache(ChunkCache.instance))
+            try
             {
+                FileHandle.Builder ibuilder = new 
FileHandle.Builder(descriptor.fileFor(Component.PRIMARY_INDEX))

Review Comment:
   hmm... as I'm looking at this now, I think it needs some fixes - channel 
proxy is not closed in case of a failure. I also missed 
`CompressionMetadata`... it is  not closeable. I think maybe could implement 
`SharedCloseable`?



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