jonmeredith commented on code in PR #1758:
URL: https://github.com/apache/cassandra/pull/1758#discussion_r931317712


##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -3074,12 +3074,17 @@ public static void 
setMigrateKeycacheOnCompaction(boolean migrateCacheEntry)
 
     public static int getSSTablePreemptiveOpenIntervalInMiB()
     {
+        if (conf.sstable_preemptive_open_interval == null)
+            return -1;
         return conf.sstable_preemptive_open_interval.toMebibytes();
     }
 
     public static void setSSTablePreemptiveOpenIntervalInMiB(int mib)
     {
-        conf.sstable_preemptive_open_interval = new 
DataStorageSpec.IntMebibytesBound(mib);
+        if (mib == -1)

Review Comment:
   ```suggestion
           if (mib < 0)
   ```



##########
conf/cassandra.yaml:
##########
@@ -992,6 +992,8 @@ compaction_throughput: 64MiB/s
 # are completely written, and used in place of the prior sstables for
 # any range that has been written. This helps to smoothly transfer reads 
 # between the sstables, reducing page cache churn and keeping hot rows hot
+# Set sstable_preemptive_open_interval to null for disabled which is 
equivalent to the sstable_preemptive_open_interval_in_mb
+# being negative

Review Comment:
   Comment is a lot longer than the rest of the block, would you mind wrapping 
it early. I'm guessing we still refer to deprecated parameters in other 
comments and we can remove them if the deprecated settings are actually removed.



##########
conf/cassandra.yaml:
##########
@@ -992,6 +992,8 @@ compaction_throughput: 64MiB/s
 # are completely written, and used in place of the prior sstables for
 # any range that has been written. This helps to smoothly transfer reads 
 # between the sstables, reducing page cache churn and keeping hot rows hot
+# Set sstable_preemptive_open_interval to null for disabled which is 
equivalent to the sstable_preemptive_open_interval_in_mb
+# being negative

Review Comment:
   How do you set to `null`? I tried 
   
   `sstable_preemptive_open_interval: null`
   
   but got this on startup.
   ```
   Exception (org.apache.cassandra.exceptions.ConfigurationException) 
encountered during startup: Invalid yaml. Those properties 
[sstable_preemptive_open_interval] are not valid
   ERROR [main] 2022-07-27 11:34:46,521 CassandraDaemon.java:896 - Exception 
encountered during startup: Invalid yaml. Those properties 
[sstable_preemptive_open_interval] are not valid
   Invalid yaml. Those properties [sstable_preemptive_open_interval] are not 
valid
   ```
   
   then
   `sstable_preemptive_open_interval:`
   
   and got
   ```Exception (org.apache.cassandra.exceptions.ConfigurationException) 
encountered during startup: Invalid yaml. Those properties 
[sstable_preemptive_open_interval] are not valid
   ERROR [main] 2022-07-27 11:37:15,213 CassandraDaemon.java:896 - Exception 
encountered during startup: Invalid yaml. Those properties 
[sstable_preemptive_open_interval] are not valid
   Invalid yaml. Those properties [sstable_preemptive_open_interval] are not 
valid```
   
   and of course `-1` still fails as expected.



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