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

[Segment Replication] Unmute testIndexingWithSegRep rolling upgrade test #9079

Merged
merged 6 commits into from
Aug 11, 2023

Conversation

dreamer-89
Copy link
Member

@dreamer-89 dreamer-89 commented Aug 2, 2023

Description

  1. Unmutes testIndexingWithSegRep as [Segment Replication] Add logic back to update tracking replication checkpoint on source #8560 (pre-requisite for segment replication bwc test) is merged to main and backported to 2.x.
  2. Fixes flakyness by first asserting row count from _cat/segments API response to enable retry without which test fails with IndexOutOfBoundsException as mentioned here. [Edit]: Needed to remove rows with 0 doc count before adding assertion of number of rows to be multiple of shard copies.

Related Issues

Resolves: #7679

Test

Ran test in a loop for 500 100 iterations without failure on main and 2.x

main

for in in {1..100}; do ./gradlew ':qa:rolling-upgrade:v2.10.0#upgradedClusterTest' --tests "org.opensearch.upgrades.IndexingIT.testIndexingWithSegRep"; done;
...
(base) ubuntu@ip-172-31-49-145:~/OpenSearch$ grep "BUILD" /tmp/bwc | wc -l
100
(base) ubuntu@ip-172-31-49-145:~/OpenSearch$ grep "BUILD SUCCESS" /tmp/bwc | wc -l
100

Will test for 2.x separately in backport PR.
2.x
for in in {1..100}; do ./gradlew ':qa:rolling-upgrade:v2.8.1#upgradedClusterTest' --tests "org.opensearch.upgrades.IndexingIT.testIndexingWithSegRep" -Dtests.seed=395148148DFDD176 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=sr-BA -Dtests.timezone=America/North_Dakota/Beulah -Druntime.java=17 >> /tmp/bwc_test; done
...
(base) ubuntu@ip-172-31-49-145:~/OpenSearch$ grep "BUILD SUCCESSFUL" /tmp/bwc_test | wc -l
100

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:


> Task :checkCompatibility
Checking compatibility for: https://github.com/opensearch-project/reporting.git with ref: main
Incompatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/ml-commons.git]
Compatible components: [https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git]

BUILD SUCCESSFUL in 25m 13s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testList
      1 org.opensearch.indices.replication.SegmentReplicationIT.testScrollWithConcurrentIndexAndSearch

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #9079 (664e1af) into main (d916f9c) will increase coverage by 0.76%.
Report is 28 commits behind head on main.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #9079      +/-   ##
============================================
+ Coverage     70.97%   71.74%   +0.76%     
- Complexity    57195    57778     +583     
============================================
  Files          4765     4765              
  Lines        270334   270334              
  Branches      39538    39538              
============================================
+ Hits         191879   193951    +2072     
+ Misses        62282    60522    -1760     
+ Partials      16173    15861     -312     

see 481 files with indirect coverage changes

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

github-actions bot commented Aug 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.snapshots.CloneSnapshotIT.testCloneShallowSnapshotIndex

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

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@dreamer-89
Copy link
Member Author

Gradle Check (Jenkins) Run Completed with:

org.opensearch.transport.nio.SimpleMockNioTransportTests.testTracerLog

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.index.IndexServiceTests.testAsyncTranslogTrimTaskOnClosedIndex

@dreamer-89 dreamer-89 marked this pull request as ready for review August 4, 2023 05:14
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@Poojita-Raj
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

* **RESULT:** FAILURE ❌

* **URL:** https://build.ci.opensearch.org/job/gradle-check/21862/

* **CommitID:** [664e1af](https://github.com/opensearch-project/OpenSearch/commit/664e1af6e838b44e7dd2edafb3e717252e5f9456)
  Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
  Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?

org.opensearch.snapshots.DeleteSnapshotIT.testDeleteMultipleShallowCopySnapshotsCase1

java.lang.AssertionError: 
Expected: is <2>
     but: was <1> 
     

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Gradle Check (Jenkins) Run Completed with:

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



> Task :checkCompatibility
Incompatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/security-analytics.git]
Compatible components: [https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

BUILD SUCCESSFUL in 24m 54s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteStoreStatsIT.testStatsOnShardUnassigned

@dreamer-89 dreamer-89 merged commit f73aac9 into opensearch-project:main Aug 11, 2023
@dreamer-89 dreamer-89 added the backport 2.x Backport to 2.x branch label Aug 11, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-9079-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f73aac93b78691dbf197d3fd35f7406fa8717e9c
# Push it to GitHub
git push --set-upstream origin backport/backport-9079-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-9079-to-2.x.

dreamer-89 added a commit to dreamer-89/OpenSearch that referenced this pull request Aug 11, 2023
…est (opensearch-project#9079)

* Unmute testIndexingWithSegRep rolling upgrade test

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

* Assert on row count before processing the result

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

* Filter rows with 0 doc count

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

* Retry assertHitCount

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

* Handle exception

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

* Add comment

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

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
dreamer-89 added a commit that referenced this pull request Aug 11, 2023
…est (#9079) (#9278)

* Unmute testIndexingWithSegRep rolling upgrade test



* Assert on row count before processing the result



* Filter rows with 0 doc count



* Retry assertHitCount



* Handle exception



* Add comment



---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
linuxpi pushed a commit to linuxpi/OpenSearch that referenced this pull request Aug 14, 2023
…est (opensearch-project#9079)

* Unmute testIndexingWithSegRep rolling upgrade test

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

* Assert on row count before processing the result

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

* Filter rows with 0 doc count

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

* Retry assertHitCount

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

* Handle exception

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

* Add comment

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

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
linuxpi pushed a commit to linuxpi/OpenSearch that referenced this pull request Aug 16, 2023
…est (opensearch-project#9079)

* Unmute testIndexingWithSegRep rolling upgrade test

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

* Assert on row count before processing the result

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

* Filter rows with 0 doc count

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

* Retry assertHitCount

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

* Handle exception

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

* Add comment

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

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…est (opensearch-project#9079)

* Unmute testIndexingWithSegRep rolling upgrade test

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

* Assert on row count before processing the result

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

* Filter rows with 0 doc count

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

* Retry assertHitCount

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

* Handle exception

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

* Add comment

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

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
…est (opensearch-project#9079)

* Unmute testIndexingWithSegRep rolling upgrade test

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

* Assert on row count before processing the result

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

* Filter rows with 0 doc count

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

* Retry assertHitCount

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

* Handle exception

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

* Add comment

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

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…est (opensearch-project#9079)

* Unmute testIndexingWithSegRep rolling upgrade test

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

* Assert on row count before processing the result

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

* Filter rows with 0 doc count

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

* Retry assertHitCount

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

* Handle exception

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

* Add comment

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] org.opensearch.upgrades.IndexingIT.testIndexingWithSegRep test failure
3 participants