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.2] Fix the bug that masterOperation(with task param) is bypassed #4115

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

@opensearch-trigger-bot opensearch-trigger-bot bot commented Aug 3, 2022

Backport 3ab0d1f from #4103

There is a problem that it doesn't make any difference to whether overriding the method void masterOperation(Task task, Request request, ClusterState state, ActionListener<Response> listener) or not.

The method `protected void masterOperation(Task task, Request request, ClusterState state, ActionListener<Response> listener)` was not properly deprecated by the commit 2a1b239 / PR #403.

There is a problem that it doesn't make any difference to whether overriding the method `void masterOperation(Task task, Request request, ClusterState state, ActionListener<Response> listener)` or not.
The reason is the only usage for the method changed to call another method `clusterManagerOperation(task, request, clusterState, l)`, which is the default implementation for the method `masterOperation(with task param)`. There is no other usage for the method `masterOperation()` so it's bypassed.

In the commit:
- Change delegation model for method `clusterManagerOperation(with task param)` to call `masterOperation(with task param)`, according to the comment below #4103 (comment)
- Add a test to validate the backwards compatibility, which copied and modified from an existing test.

Signed-off-by: Tianli Feng <ftianli@amazon.com>
(cherry picked from commit 3ab0d1f)
@opensearch-trigger-bot opensearch-trigger-bot bot requested review from a team and reta as code owners August 3, 2022 19:18
@tlfeng tlfeng added bug Something isn't working backport PRs or issues specific to backporting features or enhancments backwards-compatibility v2.2.0 labels Aug 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator

tlfeng commented Aug 3, 2022

In build 1383:

> Task :plugins:repository-s3:yamlRestTest

REPRODUCE WITH: ./gradlew ':plugins:repository-s3:yamlRestTest' --tests "org.opensearch.repositories.s3.RepositoryS3ClientYamlTestSuiteIT.test {yaml=repository_s3/20_repository_permanent_credentials/Delete a non existing snapshot}" -Dtests.seed=6AEAC5574EE779EE -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=pt-BR -Dtests.timezone=Africa/Nairobi -Druntime.java=17 -Dtests.rest.denylist=repository_s3/30_repository_temporary_credentials/*,repository_s3/40_repository_ec2_credentials/*,repository_s3/50_repository_ecs_credentials/*,repository_s3/60_repository_eks_credentials/*

org.opensearch.repositories.s3.RepositoryS3ClientYamlTestSuiteIT > test {yaml=repository_s3/20_repository_permanent_credentials/Delete a non existing snapshot} FAILED
    java.lang.AssertionError: Failure at [repository_s3/20_repository_permanent_credentials:22]: expected [2xx] status code but api [snapshot.delete] returned [500 Internal Server Error] [{"error":{"root_cause":[{"type":"repository_exception","reason":"[repository_permanent] concurrent modification of the index-N file, expected current generation [11716] but it was not found in the repository","stack_trace":"RepositoryException[[repository_permanent] concurrent modification of the index-N file, expected current generation [11716] but it was not found in the repository]
org.opensearch.repositories.blobstore.BlobStoreRepository.ensureSafeGenerationExists(BlobStoreRepository.java:2199)
org.opensearch.repositories.blobstore.BlobStoreRepository.lambda$writeIndexGen$57(BlobStoreRepository.java:2080)
...

Added to issue #2064

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator

tlfeng commented Aug 3, 2022

Build 1386 failed due to Java heap space

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2022

Gradle Check (Jenkins) Run Completed with:

@tlfeng tlfeng merged commit 03e05e0 into 2.2 Aug 3, 2022
@github-actions github-actions bot deleted the backport/backport-4103-to-2.2 branch August 3, 2022 21:35
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 backwards-compatibility bug Something isn't working v2.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants