Skip to content

SOLR-18602: Follow aliases in DELETEREPLICA by count - #5259

Open
sarkaramrit1993 wants to merge 1 commit into
apache:mainfrom
sarkaramrit1993:deletereplica-count-alias-18602
Open

sarkaramrit1993 wants to merge 1 commit into
apache:mainfrom
sarkaramrit1993:deletereplica-count-alias-18602

Conversation

@sarkaramrit1993

Copy link
Copy Markdown
Contributor

Description

SOLR-18602: DELETEREPLICA with count ignores followAliases, so collection=myAlias&count=1&followAliases=true fails with Could not find collection : myAlias. DeleteReplicaCmd.call routes count requests to deleteReplicaBasedOnCount before it reads followAliases. Deleting by replica name already resolves the alias.

Solution

Resolve the alias in deleteReplicaBasedOnCount the same way the replica-name path does.

Tests

DeleteReplicaTest.deleteReplicaByCountFollowsAliases deletes by count through an alias, for one shard and across all shards. It fails on main and passes with the fix. DeleteReplicaTest, TestCollectionAPI and AliasIntegrationTest pass.

Related to SOLR-18589 (#5255).

DELETEREPLICA with count read the collection name as-is and ignored followAliases, so an alias failed with Could not find collection. Resolve the alias the same way the replica-name path does.
@nick-boss-tech

Copy link
Copy Markdown
Contributor

Looks good.
Integration Point: It conflicts with my PR 5255 follow-up comment. The combined code must resolve the alias before calling verifyLockedCollection(collectionName), retaining both fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants