azotcsit commented on a change in pull request #1213:
URL: https://github.com/apache/cassandra/pull/1213#discussion_r716014802



##########
File path: src/java/org/apache/cassandra/service/StorageProxy.java
##########
@@ -2728,4 +2805,65 @@ public void 
disableCheckForDuplicateRowsDuringCompaction()
     {
         DatabaseDescriptor.setCheckForDuplicateRowsDuringCompaction(false);
     }
+
+    public void initialLoadPartitionDenylist()
+    {
+        partitionDenylist.initialLoad();
+    }
+
+    @Override
+    public void loadPartitionDenylist()
+    {
+        partitionDenylist.load();
+    }
+
+    @Override
+    public int getPartitionDenylistLoadAttempts()
+    {
+        return partitionDenylist.getLoadAttempts();
+    }
+
+    @Override
+    public int getPartitionDenylistLoadSuccesses()
+    {
+        return partitionDenylist.getLoadSuccesses();
+    }
+
+    @Override
+    public void setEnablePartitionDenylist(boolean enabled)
+    {
+        DatabaseDescriptor.setEnablePartitionDenylist(enabled);
+    }
+
+    @Override
+    public void setEnableDenylistWrites(boolean enabled)
+    {
+        DatabaseDescriptor.setEnableDenylistWrites(enabled);
+    }
+
+    @Override
+    public void setEnableDenylistReads(boolean enabled)
+    {
+        DatabaseDescriptor.setEnableDenylistReads(enabled);
+    }
+
+    @Override
+    public void setEnableDenylistRangeReads(boolean enabled)
+    {
+        DatabaseDescriptor.setEnableDenylistRangeReads(enabled);
+    }
+
+    @Override
+    public boolean denylistKey(String keyspace, String table, String 
keyAsString)
+    {
+        if (!Schema.instance.getKeyspaces().contains(keyspace))
+            return false;
+
+        final ColumnFamilyStore cfs = ColumnFamilyStore.getIfExists(keyspace, 
table);
+        if (cfs == null)
+            return false;
+
+        final ByteBuffer bytes = 
cfs.metadata.get().partitionKeyType.fromString(keyAsString);

Review comment:
       Let me clarify my question and what I meant. I'm not talking about 
clustering columns, but about partition keys that consist of multiple columns 
(https://docs.datastax.com/en/cql-oss/3.3/cql/cql_using/useCompositePartitionKeyConcept.html#useCompositePartitionKeyConcept).
 For example:
   ```
   CREATE TABLE %s (
     a int, -- partition key
     b int, -- partition key
     c int, -- clustering column
     d int, -- regular column
   PRIMARY KEY(a, b, c))
   WITH CLUSTERING ORDER BY (c ASC);
   ```
   In this case partition key is <a, b>. Probably we should have a test for 
this use case.




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