Skip to content
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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

maedhroz
Copy link
Contributor

patch by Caleb Rackliffe; reviewed by ? for CASSANDRA-20323

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());
Copy link
Contributor Author

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.

Copy link
Contributor Author

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

@maedhroz maedhroz changed the title Avoid limit on RFP fetch in the case of an unresolved static row CASSANDRA-20323 Avoid limit on RFP fetch in the case of an unresolved static row Feb 20, 2025
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));
}

Copy link
Contributor Author

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));
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to ReplicaFilteringWithStaticsTest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant