josh-mckenzie commented on a change in pull request #1213:
URL: https://github.com/apache/cassandra/pull/1213#discussion_r731899268



##########
File path: src/java/org/apache/cassandra/service/StorageProxy.java
##########
@@ -1054,6 +1074,25 @@ public static void mutateWithTriggers(List<? extends 
IMutation> mutations,
                                           long queryStartNanoTime)
     throws WriteTimeoutException, WriteFailureException, UnavailableException, 
OverloadedException, InvalidRequestException
     {
+        if (DatabaseDescriptor.getEnablePartitionDenylist() && 
DatabaseDescriptor.getEnableDenylistWrites())
+        {
+            for (final IMutation mutation : mutations)
+            {
+                for (final TableId tid : mutation.getTableIds())
+                {
+                    if (!partitionDenylist.isKeyPermitted(tid, 
mutation.key().getKey()))
+                    {
+                        denylistMetrics.incrementWritesRejected();
+                        // While Schema.instance.getTableMetadata() can return 
a null value, in this case the isKeyPermitted
+                        // call above ensures that we cannot have a null 
associated tid at this point.
+                        final TableMetadata tmd = 
Schema.instance.getTableMetadata(tid);

Review comment:
       Vestigial from changing this logging after realization that the 
isKeyPermitted check confirmed non-null value in the tmd return. Revised.




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