Skip to content

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

Closed
michaeljmarshall wants to merge 1 commit intoapache:cassandra-5.0from
michaeljmarshall:cassandra-19661
Closed

CASSANDRA-19661: Dynamically skip sharding L0 when SAI Vector index present#4605
michaeljmarshall wants to merge 1 commit 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
Copy link
Contributor

@maedhroz maedhroz left a comment

Choose a reason for hiding this comment

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

LGTM

…resent

Co-authored-by: Michael Marshall <mmarshall@apache.org>
Co-authored-by: Dmitry Konstantinov <netudima@gmail.com>
@maedhroz
Copy link
Contributor

Committed as 5172a0d

@maedhroz maedhroz closed this Feb 26, 2026
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.

4 participants