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 2021/11/11 17:38:20 UTC

[GitHub] [cassandra] adelapena commented on a change in pull request #1314: CASSANDRA-17072-4.0: Fix ignored client warnings in DebuggableThreadPoolExecutor

adelapena commented on a change in pull request #1314:
URL: https://github.com/apache/cassandra/pull/1314#discussion_r747695652



##########
File path: src/java/org/apache/cassandra/cql3/statements/schema/CreateKeyspaceStatement.java
##########
@@ -87,10 +83,6 @@ public Keyspaces apply(Keyspaces schema)
         keyspace.params.validate(keyspaceName);
         Keyspaces keyspaces = schema.withAddedOrUpdated(keyspace);
 
-        int newNumWarnings = ClientWarn.instance.numWarnings();
-        if (newNumWarnings > previousNumWarnings)
-            clientWarnings.addAll(ClientWarn.instance.getWarnings().subList(previousNumWarnings, newNumWarnings));
-

Review comment:
       Indeed that was a workaround to avoid accumulating warnings from previous queries. With the proposed changes we still get the proper warnings without needing that code to remove repetitions. This can be verified for example by running these two queries in a single node cluster:
   ```
   CREATE KEYSPACE k1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2}; # warns
   CREATE KEYSPACE k2 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; # doesn't warn
   ```
   We also have some tests to verify that this works as expected.




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