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-17453: Drop CloudUtil.waitForState() in favor of common waitForState() #2716

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

psalagnac
Copy link
Contributor

https://issues.apache.org/jira/browse/SOLR-17453
(this does not fully address the ticket)

Description

Method CloudUtil.waitForState() does use a Zookeeper watch, but it does active polling of the collection state. This change is in test code only.

Solution

Update tests so they use the standard waitForState(), relying on a Zookeeper watch, instead of actively polling the collection state.

I removed method CloudUtil.waitForState().

Also removed CloudUtil.clusterShape() as it is unused. The correct one is in SolrCloudTestCase and already used everywhere. This makes test code a little less bloated.

Tests

This change is in only test code.

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, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

…tate()

Update tests so they use the standard ZkStateReader.waitForState(),
relying on a Zookeeper watch, instead of actively polling the collection
state.
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.

Assuming tests seem stable, I plan to merge this PR. I like that it's focused on one thing. No CHANGES.txt as there was only test changes. Another PR can address other aspects of SOLR-17453.

@dsmiley dsmiley requested a review from sigram September 18, 2024 12:52
@dsmiley dsmiley merged commit 7d60883 into apache:main Sep 20, 2024
3 checks passed
dsmiley pushed a commit that referenced this pull request Sep 20, 2024
…tate() (#2716)

Update tests so they use the standard ZkStateReader.waitForState(),
relying on a Zookeeper watch, instead of actively polling the collection
state.

(cherry picked from commit 7d60883)
@psalagnac psalagnac deleted the wait-for-state branch September 22, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants