dcapwell commented on code in PR #1788:
URL: https://github.com/apache/cassandra/pull/1788#discussion_r961841628


##########
src/java/org/apache/cassandra/service/StorageService.java:
##########
@@ -6180,17 +6245,42 @@ public void setBatchSizeFailureThreshold(int threshold)
         logger.info("updated batch_size_fail_threshold to {}", threshold);
     }
 
+    @Deprecated
+    @Override
     public int getBatchSizeWarnThreshold()
     {
         return DatabaseDescriptor.getBatchSizeWarnThresholdInKiB();
     }
 
+    @Deprecated
+    @Override
     public void setBatchSizeWarnThreshold(int threshold)
     {
         DatabaseDescriptor.setBatchSizeWarnThresholdInKiB(threshold);
         logger.info("Updated batch_size_warn_threshold to {}", threshold);
     }
 
+    @Override
+    public int getBatchSizeWarnThresholdInKiB()

Review Comment:
   same comment as above, can we document "why" the new method that has 
identical logic?



##########
src/java/org/apache/cassandra/service/StorageService.java:
##########
@@ -4525,16 +4525,39 @@ public List<String> getParentRepairStatus(int cmd)
                
ImmutableList.<String>builder().add(pair.left.name()).addAll(pair.right).build();
     }
 
+    @Deprecated
+    @Override
     public void setRepairSessionMaxTreeDepth(int depth)
     {
         DatabaseDescriptor.setRepairSessionMaxTreeDepth(depth);
     }
 
+    @Deprecated
+    @Override
     public int getRepairSessionMaxTreeDepth()
     {
         return DatabaseDescriptor.getRepairSessionMaxTreeDepth();
     }
 
+    @Override
+    public void setRepairSessionMaximumTreeDepth(int depth)
+    {
+        try
+        {
+            DatabaseDescriptor.setRepairSessionMaxTreeDepth(depth);
+        }
+        catch (ConfigurationException e)
+        {
+            throw new IllegalArgumentException(e.getMessage());
+        }
+    }
+
+    @Override
+    public int getRepairSessionMaximumTreeDepth()

Review Comment:
   can you add a comment explaining why this exists?  Fo someone reviewing the 
code its going to be asked "why is getRepairSessionMaxTreeDepth deprecated... 
its the same logic here...", so if we are going to depreciate the `get` we 
should explain why in the code



##########
src/java/org/apache/cassandra/service/StorageService.java:
##########
@@ -6146,29 +6169,71 @@ public void setCachedReplicaRowsFailThreshold(int 
threshold)
         logger.info("updated 
replica_filtering_protection.cached_rows_fail_threshold to {}", threshold);
     }
 
+    @Override
     public int getColumnIndexSizeInKiB()
     {
         return DatabaseDescriptor.getColumnIndexSizeInKiB();
     }
 
+    @Override
+    public void setColumnIndexSizeInKiB(int columnIndexSizeInKiB)
+    {
+        int oldValueInKiB = DatabaseDescriptor.getColumnIndexSizeInKiB();
+        try
+        {
+            DatabaseDescriptor.setColumnIndexSize(columnIndexSizeInKiB);
+        }
+        catch (ConfigurationException e)
+        {
+            throw new IllegalArgumentException(e.getMessage());
+        }
+        logger.info("Updated column_index_size to {} KiB (was {} KiB)", 
columnIndexSizeInKiB, oldValueInKiB);
+    }
+
+    @Deprecated
+    @Override
     public void setColumnIndexSize(int columnIndexSizeInKB)
     {
         int oldValueInKiB = DatabaseDescriptor.getColumnIndexSizeInKiB();
         DatabaseDescriptor.setColumnIndexSize(columnIndexSizeInKB);
         logger.info("Updated column_index_size to {} KiB (was {} KiB)", 
columnIndexSizeInKB, oldValueInKiB);
     }
 
+    @Deprecated
+    @Override
     public int getColumnIndexCacheSize()
     {
         return DatabaseDescriptor.getColumnIndexCacheSizeInKiB();
     }
 
+    @Deprecated
+    @Override
     public void setColumnIndexCacheSize(int cacheSizeInKB)
     {
         DatabaseDescriptor.setColumnIndexCacheSize(cacheSizeInKB);
         logger.info("Updated column_index_cache_size to {}", cacheSizeInKB);
     }
 
+    @Override

Review Comment:
   same comment as above, can we document "why" the new method that has 
identical logic?



##########
src/java/org/apache/cassandra/service/StorageService.java:
##########
@@ -6146,29 +6169,71 @@ public void setCachedReplicaRowsFailThreshold(int 
threshold)
         logger.info("updated 
replica_filtering_protection.cached_rows_fail_threshold to {}", threshold);
     }
 
+    @Override

Review Comment:
   same comment as above, can we document "why" the new method that has 
identical logic?



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