SOLR-15119 Add logs and make default splitMethod to be LINK#2265
Open
megancarey wants to merge 6 commits intoapache:masterfrom
Open
SOLR-15119 Add logs and make default splitMethod to be LINK#2265megancarey wants to merge 6 commits intoapache:masterfrom
megancarey wants to merge 6 commits intoapache:masterfrom
Conversation
madrob
reviewed
Jan 28, 2021
Contributor
madrob
left a comment
There was a problem hiding this comment.
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
| // get split method, or default to LINK if unspecified | ||
| 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()); |
Contributor
There was a problem hiding this comment.
This should be called out in upgrade-notes, I think.
solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
Show resolved
Hide resolved
megancarey
commented
Jan 29, 2021
solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
Outdated
Show resolved
Hide resolved
megancarey
commented
Jan 29, 2021
| nodeList.addAll(nodes); | ||
|
|
||
| // Remove the node that hosts the parent shard for replica creation. | ||
| nodeList.remove(nodeName); |
Contributor
Author
There was a problem hiding this comment.
Also cleaned this up because it was bugging me :) nodeList is never used.
Fix comment
madrob
reviewed
Feb 1, 2021
solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
masterbranch../gradlew check.