Skip to content

Improve writePlacementsAllSettled performance in large clusters with …#4592

Open
beobal wants to merge 1 commit intoapache:trunkfrom
beobal:samt/CASSANDRA-21144
Open

Improve writePlacementsAllSettled performance in large clusters with …#4592
beobal wants to merge 1 commit intoapache:trunkfrom
beobal:samt/CASSANDRA-21144

Conversation

@beobal
Copy link
Contributor

@beobal beobal commented Jan 28, 2026

…many ongoing range movements

Only inflight MSOs which affect the local node need to be applied to determine the settled local ranges

…many ongoing range movements

Only inflight MSOs which affect the local node need to be applied to determine the settled local ranges
if (localRangesAllSettled != null)
return localRangesAllSettled.getOrDefault(ksm.params.replication, EMPTY_LOCAL_RANGES);

ClusterMetadata metadata = this;
Copy link
Member

Choose a reason for hiding this comment

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

don't think we need this?

or, if we do, we should probably only use metadata instead of this in the synchronized block below

Iterator<MultiStepOperation<?>> iter = metadata.inProgressSequences.iterator();
while (iter.hasNext())
if (localRangesAllSettled != null)
return localRangesAllSettled.get(ksm.params.replication);
Copy link
Member

Choose a reason for hiding this comment

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

this should also use getOrDefault (same as outside the synchronized block)

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