Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-16438: Support optional split.setPreferredLeaders prop in shard split command. #1048

Closed
wants to merge 5 commits into from

Conversation

bruno-roustant
Copy link
Contributor

  • Introduce the optional split.setPreferredLeaders prop on CollectionAdminRequest#SplitShard.
  • Make SplitShardCommand support it and set the preferredLeader property on other replicas of each created sub-shard. Distributing the preferred leaders evenly.
  • Introduce combined operations in CollectionsHandler, so that a CollectionOperation (e.g. SPLITSHARD_OP) can look at the request and (e.g. if split.setPreferredLeaders is set) create a sequence of operations to execute (e.g. split, wait for completion, rebalance leaders).

@sonatype-lift
Copy link

sonatype-lift bot commented Sep 29, 2022

⚠️ 313 God Classes were detected by Lift in this project. Visit the Lift web console for more details.

Copy link
Contributor

@dsmiley dsmiley left a comment

Choose a reason for hiding this comment

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

This incorporates at least part of #1027 (logs & docs) which will hopefully be merged any day now. Maybe today. So you'll want to rebase on that when it lands.

@bruno-roustant
Copy link
Contributor Author

@dsmiley I rebased with the recent works on these classes. Ready for a review.

@bruno-roustant
Copy link
Contributor Author

@dsmiley I refreshed to be up to date, and I added the solr.autoPreferredLeader property.

solr/CHANGES.txt Outdated
@@ -41,6 +41,8 @@ New Features

* SOLR-16409: Admin UI - Expose all highlighting parameters in the Query UI (Jeanie Lam via Eric Pugh)

* SOLR-16438: Support optional split.setPreferredLeaders prop in shard split command. (Bruno Roustant)
Copy link
Contributor

Choose a reason for hiding this comment

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

People debate this sort of thing but I think of this as an improvement to a feature and not a new feature.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see Solr Ref Guide changes

@@ -1205,7 +1205,6 @@ private void doDefensiveChecks(DistribPhase phase) {
}

if ((isLeader && !localIsLeader) || (isSubShardLeader && !localIsLeader)) {
log.error("ClusterState says we are the leader, but locally we don't think so");
Copy link
Contributor

Choose a reason for hiding this comment

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

commenting this seems to be out of scope

Copy link
Contributor

@dsmiley dsmiley left a comment

Choose a reason for hiding this comment

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

+1, Already reviewed on our custom Solr 8 branch.

Not sure if we want to wait before merge as we deploy this in "the real world".

@bruno-roustant
Copy link
Contributor Author

Thanks for the review!
Merged

@bruno-roustant bruno-roustant deleted the shardsplit branch December 16, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants