Skip to content

[BUG] Classes that implement interface 'o.o.cluster.LocalNodeMasterListener' should not have to implement abstract method 'onClusterManager()' and 'offClusterManager()' #3688

@tlfeng

Description

@tlfeng

Describe the bug
Similar issue: #3663 and #3683
Introduced by PR #2519 / commit 79eb3b0, which aims to resolve issue #1548

The problem:
2 abstract methods onMaster() and offMaster() of interface LocalNodeMasterListener got renamed directly.
It broke the backwards compatibility that all classes that implements the interface have to implement the methods in the new name.

It causes build failure for plugins, such as https://github.com/opensearch-project/index-management/blob/b6e7d35c4fe4b64a41ef9e45d0cafcdfe0289042/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt#L85

A solution right now is to revert the changes, which means change back the method name onMaster() and offMaster() in the interface LocalNodeMasterListener.

To Reproduce
Build Index management plugin with OpenSearch 2.1.0 (the code at https://github.com/opensearch-project/OpenSearch/tree/304d830275fdbe5f8095a7285ca66266987c727a)

java.lang.AbstractMethodError: Receiver class org.opensearch.indexmanagement.indexstatemanagement.IndexStateManagementHistory does not define or inherit an implementation of the resolved method 'abstract void onClusterManager()' of interface org.opensearch.cluster.LocalNodeMasterListener.

Expected behavior
Index management plugin should successfully be built with OpenSearch 2.1.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions