You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/07/19 12:04:41 UTC

[GitHub] [cassandra] adelapena commented on a diff in pull request #1737: 17735 trunk

adelapena commented on code in PR #1737:
URL: https://github.com/apache/cassandra/pull/1737#discussion_r924395761


##########
src/java/org/apache/cassandra/io/sstable/IndexSummaryManager.java:
##########
@@ -100,6 +100,7 @@ public void setResizeIntervalInMinutes(int resizeIntervalInMinutes)
     {
         int oldInterval = this.resizeIntervalInMinutes;
         this.resizeIntervalInMinutes = resizeIntervalInMinutes;
+        DatabaseDescriptor.setIndexSummaryResizeIntervalInMinutes(resizeIntervalInMinutes);

Review Comment:
   Since we want to keep `IndexSummaryManager.resizeIntervalInMinutes` synchronized with `Config.index_summary_resize_interval`, we might simplify by removing the local copy on `IndexSummaryManager` and always use the value stored in `Config`, this way: https://github.com/adelapena/cassandra/commit/87882f0c94e8f890e01becf5caaed6cbfd356971



##########
src/java/org/apache/cassandra/config/Converters.java:
##########
@@ -71,8 +71,8 @@
                             DurationSpec.IntSecondsBound::inSecondsString,
                             o -> Long.toString(o.toSeconds())),
     MINUTES_DURATION(Integer.class, DurationSpec.IntMinutesBound.class,
-                     DurationSpec.IntMinutesBound::new,
-                     DurationSpec.IntMinutesBound::toMinutes),
+                     o -> o == -1 ? null : new DurationSpec.IntMinutesBound(o),

Review Comment:
   Maybe we should rename this converter to `MINUTES_CUSTOM_DURATION` and add a comment, since this is a special way of converting due to the acceptance of `-1` as disabled value. That's what was done with `MILLIS_CUSTOM_DURATION`, although here we wouldn't have a regular/custom pair of converters.



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org