bereng commented on a change in pull request #870:
URL: https://github.com/apache/cassandra/pull/870#discussion_r571896048
##########
File path:
src/java/org/apache/cassandra/cql3/statements/schema/AlterKeyspaceStatement.java
##########
@@ -78,7 +82,14 @@ public Keyspaces apply(Keyspaces schema)
validateNoRangeMovements();
validateTransientReplication(keyspace.createReplicationStrategy(),
newKeyspace.createReplicationStrategy());
- return schema.withAddedOrUpdated(newKeyspace);
+ Keyspaces res = schema.withAddedOrUpdated(newKeyspace);
+ if (ClientWarn.instance.getWarnings() != null)
Review comment:
I think this case is not a candidate to be generalized into the
`ClientWarn`class. The problem comes from the underlying ThreadLocal and the
many execution paths. Some execute on the same thread while others on a pool
where that thread is not deterministic. Some will contain previous warnings and
others don't. That's why some warnings accumulate and others clear. But that is
particular to this specific scenario, hence the `clientWarnings()` on the API
to pull warnings across threads. So I wouldn't generalize it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]