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


##########
src/java/org/apache/cassandra/db/virtual/SettingsTable.java:
##########
@@ -59,63 +53,77 @@ final class SettingsTable extends AbstractVirtualTable
                            .addPartitionKeyColumn(NAME, UTF8Type.instance)
                            .addRegularColumn(VALUE, UTF8Type.instance)
                            .build());
-        this.config = config;
+        Set<String> unprocessed = new 
HashSet<>(BACKWARDS_COMPATABLE_NAMES.values());
+        DatabaseDescriptor.visit((key, type, ro) -> {
+            if (BACKWARDS_COMPATABLE_NAMES.containsKey(key))
+            {
+                throw new AssertionError(String.format("Name '%s' is present 
in Config, this adds a conflict as this " +
+                                                       "name had a different 
meaning in the '%s",
+                                                       key, 
SettingsTable.class.getSimpleName()));
+            }
+            unprocessed.remove(key);
+        });
+        if (!unprocessed.isEmpty())
+            throw new AssertionError("The following keys must be present in 
the Config: " + unprocessed);

Review Comment:
   Fixed.



-- 
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-unsubscr...@cassandra.apache.org

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


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

Reply via email to