Skip to content

CASSANDRA-19661: Dynamically skip sharding L0 when SAI Vector index present#4605

Open
michaeljmarshall wants to merge 3 commits intoapache:cassandra-5.0from
michaeljmarshall:cassandra-19661
Open

CASSANDRA-19661: Dynamically skip sharding L0 when SAI Vector index present#4605
michaeljmarshall wants to merge 3 commits intoapache:cassandra-5.0from
michaeljmarshall:cassandra-19661

Conversation

@michaeljmarshall
Copy link
Member

@michaeljmarshall michaeljmarshall commented Feb 6, 2026

This is a partial solution to https://issues.apache.org/jira/browse/CASSANDRA-19661. It works by using a single shard at L0 when a vector index is present. As noted in the jira ticket, there are edge cases that may still produce errors, notably the case where there are multiple data directories.

The key trade offs here are related to the time complexity for search. Since graph search is log(n), and searching m graphs is m * log(n), we see better search performance by building bigger graphs which is essentially log(m * n). We could pre-shard, which comes at a cost of increased search time complexity.

@michaeljmarshall michaeljmarshall marked this pull request as ready for review February 17, 2026 20:28
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.

2 participants