-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CASSANDRA-20323 Avoid limit on RFP fetch in the case of an unresolved static row #3916
base: trunk
Are you sure you want to change the base?
Conversation
patch by Caleb Rackliffe; reviewed by ? for CASSANDRA-20323
// provide a limit. (In the unresolved static case, we have no way of knowing how many stale rows we might | ||
// read on a silent replica before finding a live one.) | ||
ClusteringIndexFilter filter = unresolvedStatic ? command.clusteringIndexFilter(key) | ||
: new ClusteringIndexNamesFilter(clusterings, command.isReversed()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the crux of the patch. I went back and forth a bit, but I don't know if we can avoid fetching the rest of the partition (in the current data range). In practice, we're not going to be using ridiculously small fetch sizes, so I don't know how much of a problem this will actually be, but the viral nature of static columns is what it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only way I can imagine improving this is perhaps paging so that we don't fetch every row from a very large partition at once. Not 100% sure how to do that yet, but looking around the code to try to find some example of doing this w/ an UnfilteredPartitionIterator
String select = withKeyspace("SELECT pk0, ck0, ck1, s0, s1 FROM %s.single_predicate WHERE ck1 = 2 ALLOW FILTERING"); | ||
assertRows(cluster.coordinator(1).execute(select, ConsistencyLevel.ALL), row(0, 1, 2, 6, 7)); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to ReplicaFilteringWithStaticsTest
String select = withKeyspace("SELECT pk0, ck0, ck1, s0, s1 FROM %s.single_predicate WHERE ck1 = 2 ALLOW FILTERING"); | ||
assertRows(CLUSTER.coordinator(1).execute(select, ConsistencyLevel.ALL), row(0, 1, 2, 6, 7)); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to ReplicaFilteringWithStaticsTest
patch by Caleb Rackliffe; reviewed by ? for CASSANDRA-20323