Skip to content

Conversation

@michaeljmarshall
Copy link
Member

This is a draft 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.

ShardManager shardManager = getShardManager();
double flushDensity = cfs.metric.flushSizeOnDisk.get() * shardManager.shardSetCoverage() / shardManager.localSpaceCoverage();
ShardTracker boundaries = shardManager.boundaries(controller.getNumShards(flushDensity));
boolean supportsSharding = sstableLevel == 0 && indexGroups.stream().allMatch(Index.Group::supportsL0Shards);
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be actually a condition like:
sstableLevel > 0 || indexGroups.stream().allMatch(Index.Group::supportsL0Shards) ?

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