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
Conversation
bruno-roustant
commented
Sep 29, 2022
- 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).
solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
Outdated
Show resolved
Hide resolved
|
There was a problem hiding this 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.
50add9a
to
e931eef
Compare
ac91e3e
to
546190b
Compare
@dsmiley I rebased with the recent works on these classes. Ready for a review. |
546190b
to
05087ac
Compare
@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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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
There was a problem hiding this 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".
Thanks for the review! |