maedhroz commented on code in PR #3890:
URL: https://github.com/apache/cassandra/pull/3890#discussion_r1951922090


##########
src/java/org/apache/cassandra/service/reads/ReplicaFilteringProtection.java:
##########
@@ -427,12 +427,10 @@ private void addToFetch(Row row)
             if (toFetch == null)
                 toFetch = BTreeSet.builder(command.metadata().comparator);
 
-            // Note that for static, we shouldn't add the clustering to the 
clustering set (the
-            // ClusteringIndexNamesFilter we'll build from this later does not 
expect it), but the fact
-            // we created a builder in the first place will act as a marker 
that the static row must be
-            // fetched, even if no other rows are added for this partition.
             if (row.isStatic())
-                unresolvedStatic = true;
+                // If there is an expression on a static column, the static 
row must be marked unresolved, as
+                // completing it could produce matches across the entire 
partition.
+                unresolvedStatic = command.rowFilter().hasStaticExpression();

Review Comment:
   This is the crux of the patch. I might expand the comment to make it clear 
that we still retrieve the static row when any non-static row needs to be 
completed by RFP, and this is exactly what happens in the new tests in this 
patch.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to