mike-tr-adamson commented on code in PR #2540:
URL: https://github.com/apache/cassandra/pull/2540#discussion_r1293584869


##########
src/java/org/apache/cassandra/index/sai/disk/v1/V1OnDiskFormat.java:
##########
@@ -236,11 +248,14 @@ public Set<IndexComponent> 
perColumnIndexComponents(IndexContext indexContext)
     }
 
     @Override
-    public int openFilesPerSSTableIndex()
+    public int openFilesPerSSTableIndex(boolean hasClustering)
     {
-        // For the V1 format there are always 4 open files per SSTable - token 
values, primary key trie,
-        // primary key blocks, primary key block offsets
-        return 4;
+        // For the V1 format the number of open files depends on whether the 
table has clustering. For wide tables
+        // the number of open files will be 6 per SSTable - token values, 
partition sizes index, partition key blocks,
+        // partition key block offsets, clustering key blocks & clustering key 
block offsets and for skinny tables
+        // the number of files will be 4 per SSTable - token values, partition 
key sizes, partition key blocks &
+        // partition key block offsets.
+        return hasClustering ? 6 : 4;

Review Comment:
   It's used in `SSTableIndex.sizeOfPerColumnComponents`



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