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



##########
File path: src/java/org/apache/cassandra/index/Index.java
##########
@@ -426,6 +426,16 @@ public Indexer indexerFor(DecoratedKey key,
                               WriteContext ctx,
                               IndexTransaction.Type transactionType);
 
+    /**
+     * Tells whether this index supports replica fitering protection or not.
+     *
+     * @return true if this index supports replica filtering protection, false 
otherwise
+     */
+    default boolean supportsReplicaFilteringProtection()
+    {
+        return true;

Review comment:
       The only index implementation in the codebase other than SASI is regular 
indexes (`CassandraIndex` and its subclasses). Regular indexes aren't custom 
indexes so the new method won't ever be called for them. Instead RFP is always 
used with regular indexes. There are also some mock index implementations in 
unit tests but they are not used in a way that RFP is involved. So regarding 
indexes in Cassandra codebase the default value is only relevant for SASI, 
which is a minimal change. As for third party indexes out there, the question 
for the default value is not what value is more frequently used but what value 
is safer in case the implementations miss the changes in the index API and 
forget to implement the method. It's worth mentioning that previously existing 
implementations might be already compatible with SRP without any changes if 
they don't use custom syntax nor transformations of the indexed data. On the 
one hand, I'd say that indexes with wrongly enabled SRP are far worse
  than indexes with wrongly disabled SRP, which leads me to prefer a default of 
`false` for the sake of compatibility. On the other hand, it's very desirable 
to have SRP enabled since it's a bug fix, and a wrongly enabled SRP is far easy 
to detect, which makes me prefer a default of `true` for the sake of 
correctness. wdyt?




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

Reply via email to