smiklosovic commented on code in PR #2334:
URL: https://github.com/apache/cassandra/pull/2334#discussion_r1431590737


##########
src/java/org/apache/cassandra/io/sstable/indexsummary/IndexSummaryManager.java:
##########
@@ -114,10 +122,24 @@ public int getResizeIntervalInMinutes()
         return DatabaseDescriptor.getIndexSummaryResizeIntervalInMinutes();
     }
 
+    private static int getDurationInMinutes(DurationSpec.IntMinutesBound 
duration)
+    {
+        return duration == null ? -1 : duration.toMinutes();
+    }
+
     public void setResizeIntervalInMinutes(int resizeIntervalInMinutes)
     {
-        int oldInterval = getResizeIntervalInMinutes();
-        
DatabaseDescriptor.setIndexSummaryResizeIntervalInMinutes(resizeIntervalInMinutes);
+        runExceptionally(() -> 
DatabaseDescriptor.setIndexSummaryResizeIntervalInMinutes(resizeIntervalInMinutes),
+                         e -> {
+                             logger.error("Unable to update 
index_summary_resize_interval", e);
+                             throw new RuntimeException(e.getMessage());
+                         });
+    }
+
+    private void handleResizeIntervalInMinutes(DurationSpec.IntMinutesBound 
oldValue, DurationSpec.IntMinutesBound newValue)
+    {
+        int oldInterval = getDurationInMinutes(oldValue);
+        int resizeIntervalInMinutes = getDurationInMinutes(newValue);

Review Comment:
   @Mmuzaf where was this property taken from before? I see it is already used 
in this method further down bellow ... 



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