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] [Segment Replication] Added mixed and rolling upgrade bwc test (#7537) #7626

Merged

Conversation

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@dreamer-89
Copy link
Member Author

Gradle Check (Jenkins) Run Completed with:

The test currently fails as segment replication is not available for 1.x branch. One possible hack would be to check node version for all nodes and return in case any node running on 1.x but it is not clean. @reta : Would you know a way around this ?

REPRODUCE WITH: ./gradlew ':qa:rolling-upgrade:v1.3.10#oldClusterTest' --tests "org.opensearch.upgrades.IndexingIT.testIndexingWithSegRep" -Dtests.seed=C8DFD73DC280DA80 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it-IT -Dtests.timezone=Pacific/Truk -Druntime.java=17

org.opensearch.upgrades.IndexingIT > testIndexingWithSegRep FAILED
    org.opensearch.client.ResponseException: method [PUT], host [http://127.0.0.1:35219/], URI [/test-index-segrep], status line [HTTP/1.1 400 Bad Request]
    {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [index.replication.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],"type":"illegal_argument_exception","reason":"unknown setting [index.replication.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"},"status":400}
        at __randomizedtesting.SeedInfo.seed([C8DFD73DC280DA80:47A6C17036D92F41]:0)
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
        at app//org.opensearch.test.rest.OpenSearchRestTestCase.createIndex(OpenSearchRestTestCase.java:981)
        at app//org.opensearch.test.rest.OpenSearchRestTestCase.createIndex(OpenSearchRestTestCase.java:964)
        at app//org.opensearch.test.rest.OpenSearchRestTestCase.createIndex(OpenSearchRestTestCase.java:960)
        at app//org.opensearch.upgrades.IndexingIT.testIndexingWithSegRep(IndexingIT.java:257)

@dreamer-89 dreamer-89 force-pushed the backport/backport-7537-to-2.x branch from fe81780 to 58830ea Compare June 20, 2023 20:16
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@dreamer-89
Copy link
Member Author

Hit couple of issues while working on backport PR.

  1. Compilation errors on JDK 11 due to bug on JDK. The fix was available on 11.0.17+ version
 [2.9.0] > Task :server:compileJava
 [2.9.0] Note: Recompile with -Xlint:deprecation for details.
 [2.9.0] Note: Some input files use unchecked or unsafe operations.
 [2.9.0] Note: Recompile with -Xlint:unchecked for details.
 [2.9.0] compiler message file broken: key=compiler.misc.msg.bug arguments=11, {1}, {2}, {3}, {4}, {5}, {6}, {7}
 [2.9.0] java.lang.NullPointerException
 [2.9.0]        at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1235)
 [2.9.0]        at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
 [2.9.0]        at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
 [2.9.0]        at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
 [2.9.0]        at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:213)
  1. Response object parsing with ObjectPath resulting in NPE. The issue happens when index _stats API response is parsed here. I hit same issue wherever Response parsing was attempted e.g. FullClusterRestartIT. I see the issue never happens on CI so probably some issue with configuration. This is not yet root caused.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@opensearch-project opensearch-project deleted a comment from github-actions bot Jun 27, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

imRishN pushed a commit to imRishN/OpenSearch that referenced this pull request Jun 27, 2023
…points and skip tests for 1.x bwc versions (opensearch-project#8203)

* [Segment Replication] Verify segment replication stats in bwc test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Log cleanup

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Spotless check

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches for mixed clusters

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version string in build to identify bwc version

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Use correct bwc version string

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments from opensearch-project#7626

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
@dreamer-89
Copy link
Member Author

PR is blocked due to #8322 where replica shard segment replication stats (_cat/segment_replication) are not updated on primary.

@dreamer-89 dreamer-89 added the blocked Identifies issues that are blocked label Jun 28, 2023
dreamer-89 added a commit to dreamer-89/OpenSearch that referenced this pull request Jun 28, 2023
…points and skip tests for 1.x bwc versions (opensearch-project#8203)

* [Segment Replication] Verify segment replication stats in bwc test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Log cleanup

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Spotless check

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches for mixed clusters

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version string in build to identify bwc version

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Use correct bwc version string

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments from opensearch-project#7626

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>

[Segment Replication] Use _cat/segments vs index stats + _search to verify doc count

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Self review

Signed-off-by: Suraj Singh <surajrider@gmail.com>

remove unused imports

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Handle 0 doc count segments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Add missing import statement

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@dreamer-89 dreamer-89 force-pushed the backport/backport-7537-to-2.x branch from 93ed0cf to 51397d5 Compare June 28, 2023 18:54
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

sudarshan-baliga pushed a commit to Gaurav614/OpenSearch that referenced this pull request Jun 29, 2023
…points and skip tests for 1.x bwc versions (opensearch-project#8203)

* [Segment Replication] Verify segment replication stats in bwc test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Log cleanup

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Spotless check

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches for mixed clusters

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version string in build to identify bwc version

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Use correct bwc version string

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments from opensearch-project#7626

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@dreamer-89
Copy link
Member Author

dreamer-89 commented Jul 9, 2023

This PR was failing because of breaking change introduced in #8020. Opened issue #8322 for tracking.

dreamer-89 added a commit to dreamer-89/OpenSearch that referenced this pull request Jul 11, 2023
…points and skip tests for 1.x bwc versions (opensearch-project#8203)

* [Segment Replication] Verify segment replication stats in bwc test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Log cleanup

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Spotless check

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches for mixed clusters

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version string in build to identify bwc version

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Use correct bwc version string

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments from opensearch-project#7626

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>

[Segment Replication] Use _cat/segments vs index stats + _search to verify doc count

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Self review

Signed-off-by: Suraj Singh <surajrider@gmail.com>

remove unused imports

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Handle 0 doc count segments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Add missing import statement

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@dreamer-89 dreamer-89 force-pushed the backport/backport-7537-to-2.x branch from 51397d5 to 8fc0515 Compare July 11, 2023 20:27
@dreamer-89 dreamer-89 changed the title [Segment Replication] Added mixed and rolling upgrade bwc test (#7537) [Backport] [Segment Replication] Added mixed and rolling upgrade bwc test (#7537) Jul 11, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

…earch-project#7537)

* [Segment Replication] Added mixed cluster bwc test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Remove unnecessary gradle task for segrep

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Spotless fix

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Spotless fix

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* [Segment Replication] Rolling upgrade test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* PR feedback and cleanup

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Verify replica doc count only when it is assigned

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Remove wait for yellow cluster

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
(cherry picked from commit 0788feb)

Add version check to skip test for 1.x bwc branches

Signed-off-by: Suraj Singh <surajrider@gmail.com>
…to shard allocation map (opensearch-project#7876)

* [Segment Replication] Wait for shard relocation before building node to shard allocation map

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Remove unused imports

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Fix imports

Signed-off-by: Suraj Singh <surajrider@gmail.com>
…points and skip tests for 1.x bwc versions (opensearch-project#8203)

* [Segment Replication] Verify segment replication stats in bwc test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Log cleanup

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Spotless check

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches for mixed clusters

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version string in build to identify bwc version

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Use correct bwc version string

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments from opensearch-project#7626

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>

[Segment Replication] Use _cat/segments vs index stats + _search to verify doc count

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Self review

Signed-off-by: Suraj Singh <surajrider@gmail.com>

remove unused imports

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Handle 0 doc count segments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Add missing import statement

Signed-off-by: Suraj Singh <surajrider@gmail.com>
…ation (opensearch-project#8267)

* [Segment Replication] Use _cat/segments vs index stats + _search to verify doc count

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Self review

Signed-off-by: Suraj Singh <surajrider@gmail.com>

remove unused imports

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Handle 0 doc count segments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Use 1 minute timeout for assertBusy validations and comments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Add missing import statement

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Suraj Singh <surajrider@gmail.com>
@dreamer-89 dreamer-89 force-pushed the backport/backport-7537-to-2.x branch from 609e662 to 8005cb6 Compare July 12, 2023 20:11
@dreamer-89

This comment was marked as outdated.

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.index.SegmentReplicationPressureIT.testBelowReplicaLimit
      1 org.opensearch.action.admin.cluster.node.tasks.ResourceAwareTasksTests.testTaskResourceTrackingDuringTaskCancellation

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #7626 (3df7b6b) into 2.x (4a62494) will decrease coverage by 0.08%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                2.x    #7626      +/-   ##
============================================
- Coverage     70.69%   70.62%   -0.08%     
+ Complexity    57214    57205       -9     
============================================
  Files          4747     4747              
  Lines        270933   270933              
  Branches      39975    39975              
============================================
- Hits         191544   191340     -204     
- Misses        62909    63208     +299     
+ Partials      16480    16385      -95     

see 441 files with indirect coverage changes

@dreamer-89 dreamer-89 merged commit 90d1da2 into opensearch-project:2.x Jul 13, 2023
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…points and skip tests for 1.x bwc versions (opensearch-project#8203)

* [Segment Replication] Verify segment replication stats in bwc test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Log cleanup

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Spotless check

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version check to skip test for 1.x bwc branches for mixed clusters

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add version string in build to identify bwc version

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Use correct bwc version string

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments from opensearch-project#7626

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Identifies issues that are blocked skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants