Github user vinaykumarchella commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/277#discussion_r223518337
--- Diff: src/java/org/apache/cassandra/service/StorageProxy.java ---
@@ -1545,6 +1546,18 @@ public static PartitionIterator read(SinglePartitionReadCommand.Group
group, Con
throw new IsBootstrappingException();
}
+ // check if the partition in question is blacklisted; if yes, reject READ operation
+ if (BlacklistedPartitionCache.instance.size() > 0)
+ {
+ for (SinglePartitionReadQuery query : group.queries)
+ {
+ if (BlacklistedPartitionCache.instance.contains(query.metadata().id,
query.partitionKey()))
+ {
+ throw new InvalidRequestException("Cannot perform READ on a blacklisted
partition");
--- End diff --
Do you want to expose the parition key here in the exception message?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
|