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

[Backport 2.x] Rename public classes with 'Master' to 'ClusterManager' #3870

Merged
merged 6 commits into from
Jul 14, 2022

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

@opensearch-trigger-bot opensearch-trigger-bot bot commented Jul 12, 2022

Backport a7e113a from #3619

Description:
Replace master terminology by cluster manager in the public Java APIs to support inclusive language.
The PR deal with the public class name in the repository (except for those covered in issue #3542).

  • Replace Master to ClusterManager for all the classes, including all the references to the classes.

The above changes are done by the Rename refactoring feature of IntelliJ IDEA, so that both the definition and reference can be renamed.

The next PR will be like de21446, adding back the classes in old name for backwards compatibility, so this will not be a breaking change eventually.

List of classes that renamed in this PR:
sever directory:
interface LocalNodeMasterListener -> LocalNodeClusterManagerListener
final class MasterNodeChangePredicate -> ClusterManagerNodeChangePredicate
NotMasterException -> NotClusterManagerException
NoMasterBlockService -> NoClusterManagerBlockService
UnsafeBootstrapMasterCommand - UnsafeBootstrapClusterManagerCommand
MasterNotDiscoveredException -> ClusterManagerNotDiscoveredException
RestMasterAction -> RestClusterManagerAction

List of classes that are not renamed:
sever directory:
MasterService
test/framework directory:
FakeThreadPoolMasterService
BlockMasterServiceOnMaster
BusyMasterServiceDisruption

Replace master terminology by cluster manager in the public Java APIs to support inclusive language.
The PR deal with the public class name in the repository (except for those covered in issue #3542).

* Replace Master to ClusterManager for all the classes, including all the references to the classes.

The next PR will be like de21446, adding back the classes in old name for backwards compatibility.

List of classes that renamed in this PR:
sever directory:
interface LocalNodeMasterListener -> LocalNodeClusterManagerListener
final class MasterNodeChangePredicate -> ClusterManagerNodeChangePredicate
NotMasterException -> NotClusterManagerException
NoMasterBlockService -> NoClusterManagerBlockService
UnsafeBootstrapMasterCommand - UnsafeBootstrapClusterManagerCommand
MasterService -> UnsafeBootstrapClusterManagerCommand
MasterNotDiscoveredException -> ClusterManagerNotDiscoveredException
RestMasterAction -> RestClusterManagerAction
test/framework directory:
FakeThreadPoolMasterService -> FakeThreadPoolClusterManagerService
BlockMasterServiceOnMaster -> BlockClusterManagerServiceOnMaster
BusyMasterServiceDisruption -> BusyClusterManagerServiceDisruption

Signed-off-by: Tianli Feng <[email protected]>
(cherry picked from commit a7e113a)
@opensearch-trigger-bot opensearch-trigger-bot bot requested review from a team and reta as code owners July 12, 2022 21:44
@tlfeng tlfeng added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments v2.2.0 labels Jul 12, 2022
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator

tlfeng commented Jul 12, 2022

In build 475

> Task :server:internalClusterTest

REPRODUCE WITH: ./gradlew ':server:internalClusterTest' --tests "org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testHighWatermarkNotExceeded" -Dtests.seed=252D2361017E5750 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=ja-JP-u-ca-japanese-x-lvariant-JP -Dtests.timezone=America/Creston -Druntime.java=17

org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT > testHighWatermarkNotExceeded FAILED
    java.lang.AssertionError: Mismatching shard routings: []
    Expected: a collection with size <1>
         but: collection size was <0>
        at __randomizedtesting.SeedInfo.seed([252D2361017E5750:CC0CC2D381B89EBE]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:964)
        at org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.lambda$assertBusyWithDiskUsageRefresh$5(DiskThresholdDeciderIT.java:362)
        at org.opensearch.test.OpenSearchTestCase.assertBusy(OpenSearchTestCase.java:1049)
        at org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.assertBusyWithDiskUsageRefresh(DiskThresholdDeciderIT.java:355)
        at org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testHighWatermarkNotExceeded(DiskThresholdDeciderIT.java:188)

It's reported in issue #3579

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2022

Codecov Report

❗ No coverage uploaded for pull request base (2.x@8b53c51). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             2.x    #3870   +/-   ##
======================================
  Coverage       ?   70.51%           
  Complexity     ?    56330           
======================================
  Files          ?     4520           
  Lines          ?   271634           
  Branches       ?    39972           
======================================
  Hits           ?   191534           
  Misses         ?    63991           
  Partials       ?    16109           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b53c51...ef3a98a. Read the comment docs.

@tlfeng
Copy link
Collaborator

tlfeng commented Jul 12, 2022

@reta Thank you for your review!

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator

tlfeng commented Jul 13, 2022

In build 487, it's the test failure of #3579

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator

tlfeng commented Jul 13, 2022

In build 491, the test failure is reported in issue #3650

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator

tlfeng commented Jul 13, 2022

in build 494:


  2> REPRODUCE WITH: ./gradlew ':qa:smoke-test-multinode:integTest' --tests "org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT" -Dtests.method="test {yaml=indices.open/10_basic/Basic test for index open/close}" -Dtests.seed=92C399F2076DFC1A -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=mt -Dtests.timezone=America/Dawson_Creek -Druntime.java=17
  2> java.lang.Exception: Test abandoned because suite timeout was reached.
        at __randomizedtesting.SeedInfo.seed([92C399F2076DFC1A]:0)
  2> Lul 12, 2022 6:49:46 WN com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks
  2> WARNING: Will linger awaiting termination of 292 leaked thread(s).
  1> [2022-07-12T18:49:46,512][INFO ][o.o.s.SmokeTestMultiNodeClientYamlTestSuiteIT] [test] [yaml=indices.open/10_basic/Basic test for index open/close] after test
  2> java.lang.Exception: Suite timeout exceeded (>= 2400000 msec).
        at __randomizedtesting.SeedInfo.seed([92C399F2076DFC1A]:0)

@tlfeng
Copy link
Collaborator

tlfeng commented Jul 13, 2022

./gradlew check ran successfully in my local machine.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator

tlfeng commented Jul 13, 2022

@owaiskazi19 Thanks for your review!

Tianli Feng added 3 commits July 14, 2022 14:28
…ckMasterServiceOnMaster and BusyMasterServiceDisruption

Signed-off-by: Tianli Feng <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator

tlfeng commented Jul 14, 2022

In Build 648:

* What went wrong:
Execution failed for task ':distribution:bwc:maintenance:buildBwcLinuxTar'.
> Building 1.3.4 didn't generate expected file /var/jenkins/workspace/gradle-check/search/distribution/bwc/maintenance/build/bwc/checkout-1.3/distribution/archives/linux-tar/build/distributions/opensearch-min-1.3.4-SNAPSHOT-linux-x64.tar.gz

It must caused by version 1.3.5 is not added into bwcVersions file of 2.x branch. The code will be like e724b2e

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments enhancement Enhancement or improvement to existing feature or request v2.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants