tolbertam commented on code in PR #4558:
URL: https://github.com/apache/cassandra/pull/4558#discussion_r2902158679


##########
src/java/org/apache/cassandra/schema/SystemDistributedKeyspace.java:
##########
@@ -99,7 +99,20 @@ private SystemDistributedKeyspace()
 
     public static final String AUTO_REPAIR_PRIORITY = "auto_repair_priority";
 
-    public static final Set<String> TABLE_NAMES = 
ImmutableSet.of(REPAIR_HISTORY, PARENT_REPAIR_HISTORY, VIEW_BUILD_STATUS, 
PARTITION_DENYLIST_TABLE, AUTO_REPAIR_HISTORY, AUTO_REPAIR_PRIORITY);
+    /**
+     * Returns the set of table names for the system_distributed keyspace.
+     * When AUTOREPAIR_ENABLE is false, auto-repair tables are not included.
+     */
+    public static Set<String> getTableNames()
+    {
+        if (CassandraRelevantProperties.AUTOREPAIR_ENABLE.getBoolean())
+        {
+            return ImmutableSet.of(REPAIR_HISTORY, PARENT_REPAIR_HISTORY, 
VIEW_BUILD_STATUS,
+                                   PARTITION_DENYLIST_TABLE, 
AUTO_REPAIR_HISTORY, AUTO_REPAIR_PRIORITY);
+        }
+        return ImmutableSet.of(REPAIR_HISTORY, PARENT_REPAIR_HISTORY, 
VIEW_BUILD_STATUS,
+                               PARTITION_DENYLIST_TABLE);

Review Comment:
   I like the solution you came up with for this (two separate variables that 
chosen selectively based on the property) :+1:



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