-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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-15119 Add logs and make default splitMethod to be LINK #2265
base: master
Are you sure you want to change the base?
Conversation
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 is a good change. Maybe instead of code comments we add debug logs for each step, with additional state information. If it's helpful to you reading the code now, it's probably helpful to somebody troubleshooting based on logs later. Some of the steps might already provide logging, so we can leave those as marker comments.
solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
Show resolved
Hide resolved
boolean waitForFinalState = message.getBool(CommonAdminParams.WAIT_FOR_FINAL_STATE, false); | ||
String methodStr = message.getStr(CommonAdminParams.SPLIT_METHOD, SolrIndexSplitter.SplitMethod.REWRITE.toLower()); | ||
String methodStr = message.getStr(CommonAdminParams.SPLIT_METHOD, SolrIndexSplitter.SplitMethod.LINK.toLower()); |
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 should be called out in upgrade-notes, I think.
solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
Outdated
Show resolved
Hide resolved
nodeList.addAll(nodes); | ||
|
||
// Remove the node that hosts the parent shard for replica creation. | ||
nodeList.remove(nodeName); |
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.
Also cleaned this up because it was bugging me :) nodeList is never used.
Fix comment
Description
REWRITE splitMethod is considerably slower than LINK. Deprecated Autoscaling triggers used LINK method as default, contradicting SplitShardCmd.
Solution
Unify branch_8x autoscaling code with SplitShardCmd and make the more performant splitMethod (LINK) the default.
Tests
Added a test to SplitShardTest to run against all available split methods, and verify that an invalid splitMethod causes splits to fail.
Checklist
Please review the following and check all that apply:
master
branch../gradlew check
.