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-15119 Add logs and make default splitMethod to be LINK #2265

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

megancarey
Copy link
Contributor

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:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the master branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Ref Guide (for Solr changes only).

Copy link
Contributor

@madrob madrob left a 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.

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());
Copy link
Contributor

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.

nodeList.addAll(nodes);

// Remove the node that hosts the parent shard for replica creation.
nodeList.remove(nodeName);
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants