blambov commented on code in PR #2879:
URL: https://github.com/apache/cassandra/pull/2879#discussion_r1413671489


##########
src/java/org/apache/cassandra/io/sstable/format/big/BigFormatPartitionWriter.java:
##########
@@ -70,7 +70,12 @@ public class BigFormatPartitionWriter extends 
SortedTablePartitionWriter
                              Version version,
                              ISerializer<IndexInfo> indexInfoSerializer)
     {
-        this(header, writer, version, indexInfoSerializer, 
DatabaseDescriptor.getColumnIndexCacheSize(), 
DatabaseDescriptor.getColumnIndexSize(DEFAULT_GRANULARITY));
+        this(header,
+             writer,
+             version,
+             indexInfoSerializer,
+             
(int)version.getSSTableFormatValue(Option.COLUMN_INDEX_CACHE_SIZE),

Review Comment:
   The problem with a solution like this is that it assumes we know all the 
options that a format may require. This cannot work if we allow formats to be 
plugged into Cassandra (e.g. by supplying an additional JAR with their 
implementation).
   
   The format itself should deal with its options. And the rest of the code 
can't make options we don't know about second-hand citizens, i.e. we must treat 
the options we know about in the same way that we treat the options we don't 
know about.



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