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

CardinalityIT/NestedIT test failures with concurrent search enabled and AssertingCodec #8303

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

sohami
Copy link
Collaborator

@sohami sohami commented Jun 27, 2023

Description

The tests were failing because during the concurrent segment search for each slice the codec producers for the leafs were initialized by the slice thread. Later in reduce phase, the post collection happens over those codec producers on the search thread. With AssertingCodec it verifies that all access is done by the same thread causing the failures. More details are in #8095

Related Issues

Resolves #8095

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.

@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.remotestore.SegmentReplicationUsingRemoteStoreIT.testNodeDropWithOngoingReplication

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #8303 (8429693) into main (68ddf24) will increase coverage by 0.06%.
The diff coverage is 67.34%.

❗ Current head 8429693 differs from pull request most recent head e01b743. Consider uploading reports for the commit e01b743 to get more accurate results

@@             Coverage Diff              @@
##               main    #8303      +/-   ##
============================================
+ Coverage     70.93%   71.00%   +0.06%     
+ Complexity    57184    57108      -76     
============================================
  Files          4770     4760      -10     
  Lines        270280   269725     -555     
  Branches      39499    39460      -39     
============================================
- Hits         191726   191520     -206     
+ Misses        62439    62069     -370     
- Partials      16115    16136      +21     
Impacted Files Coverage Δ
...nsearch/search/internal/FilteredSearchContext.java 8.92% <0.00%> (-0.25%) ⬇️
...arch/aggregations/DefaultAggregationProcessor.java 13.95% <50.00%> (+1.75%) ⬆️
.../search/aggregations/BucketCollectorProcessor.java 65.62% <65.62%> (ø)
.../org/opensearch/search/internal/SearchContext.java 38.00% <66.66%> (+1.82%) ⬆️
...va/org/opensearch/search/DefaultSearchContext.java 78.90% <100.00%> (+0.33%) ⬆️
...arch/aggregations/AggregationCollectorManager.java 82.75% <100.00%> (+10.03%) ⬆️
...h/aggregations/ConcurrentAggregationProcessor.java 81.25% <100.00%> (+1.25%) ⬆️
...ensearch/search/internal/ContextIndexSearcher.java 68.23% <100.00%> (+0.18%) ⬆️

... and 579 files with indirect coverage changes

@sohami
Copy link
Collaborator Author

sohami commented Jun 28, 2023

@reta Can you please help to review ?

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@sohami
Copy link
Collaborator Author

sohami commented Jul 11, 2023

Gradle Check (Jenkins) Run Completed with:

Failed tests are unrelated:

[org.opensearch.remotestore.RemoteStoreIT.testStaleCommitDeletionWithInvokeFlush](https://build.ci.opensearch.org/job/gradle-check/19968/testReport/junit/org.opensearch.remotestore/RemoteStoreIT/testStaleCommitDeletionWithInvokeFlush/)
[org.opensearch.remotestore.RemoteStoreRefreshListenerIT.testRemoteRefreshRetryOnFailure](https://build.ci.opensearch.org/job/gradle-check/19968/testReport/junit/org.opensearch.remotestore/RemoteStoreRefreshListenerIT/testRemoteRefreshRetryOnFailure/)
[org.opensearch.remotestore.multipart.RemoteStoreMultipartIT.testStaleCommitDeletionWithInvokeFlush](https://build.ci.opensearch.org/job/gradle-check/19968/testReport/junit/org.opensearch.remotestore.multipart/RemoteStoreMultipartIT/testStaleCommitDeletionWithInvokeFlush/)

@reta
Copy link
Collaborator

reta commented Jul 12, 2023

@sohami could you please add changelog (may be using different phrasing), it seems we are changing not the tests but core functionality.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testSearchAggregationWithNetworkDisruption_FailOpenEnabled

@sohami
Copy link
Collaborator Author

sohami commented Jul 12, 2023

@sohami could you please add changelog (may be using different phrasing), it seems we are changing not the tests but core functionality.

Added the changelog entry

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@sohami
Copy link
Collaborator Author

sohami commented Jul 13, 2023

@reta Can this be merged ?

@reta
Copy link
Collaborator

reta commented Jul 13, 2023

@reta Can this be merged ?

@sohami Green build? Please rebase may be

…nd AssertingCodec

The tests were failing because during the concurrent segment search for each slice the
codec producers for the leafs were initialized by the slice thread. Later in reduce phase,
the post collection happens over those codec producers on the search thread.
With AssertingCodec it verifies that all access is done by the same thread causing the failures

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>
Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>
@sohami
Copy link
Collaborator Author

sohami commented Jul 13, 2023

@reta Can this be merged ?

@sohami Green build? Please rebase may be

I did rebase yesterday as part of final commit and gradle seems to be failing for bwc2.9 jar. Let me rebase again to see if that fixes below issue.

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

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta reta merged commit 064f265 into opensearch-project:main Jul 13, 2023
7 checks passed
@reta reta added the backport 2.x Backport to 2.x branch label Jul 13, 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:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-8303-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 064f265362f6ae8296bfeed09aaaf48be86e6a4d
# Push it to GitHub
git push --set-upstream origin backport/backport-8303-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

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

@reta
Copy link
Collaborator

reta commented Jul 13, 2023

Hehe @sohami please backport manually to 2.x, thank you

sohami added a commit to sohami/OpenSearch that referenced this pull request Jul 13, 2023
…nd AssertingCodec (opensearch-project#8303)

* CardinalityIT/NestedIT test failures with concurrent search enabled and AssertingCodec
The tests were failing because during the concurrent segment search for each slice the
codec producers for the leafs were initialized by the slice thread. Later in reduce phase,
the post collection happens over those codec producers on the search thread.
With AssertingCodec it verifies that all access is done by the same thread causing the failures

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Address review comments

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

---------

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>
@sohami
Copy link
Collaborator Author

sohami commented Jul 13, 2023

Hehe @sohami please backport manually to 2.x, thank you

@reta Created backport pr #8687. Thanks!

kotwanikunal pushed a commit that referenced this pull request Jul 13, 2023
…nd AssertingCodec (#8303) (#8687)

* CardinalityIT/NestedIT test failures with concurrent search enabled and AssertingCodec
The tests were failing because during the concurrent segment search for each slice the
codec producers for the leafs were initialized by the slice thread. Later in reduce phase,
the post collection happens over those codec producers on the search thread.
With AssertingCodec it verifies that all access is done by the same thread causing the failures



* Address review comments



---------

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>
buddharajusahil pushed a commit to buddharajusahil/OpenSearch that referenced this pull request Jul 18, 2023
…nd AssertingCodec (opensearch-project#8303)

* CardinalityIT/NestedIT test failures with concurrent search enabled and AssertingCodec
The tests were failing because during the concurrent segment search for each slice the
codec producers for the leafs were initialized by the slice thread. Later in reduce phase,
the post collection happens over those codec producers on the search thread.
With AssertingCodec it verifies that all access is done by the same thread causing the failures

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Address review comments

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

---------

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>
Signed-off-by: sahil buddharaju <sahilbud@amazon.com>
baba-devv pushed a commit to baba-devv/OpenSearch that referenced this pull request Jul 29, 2023
…nd AssertingCodec (opensearch-project#8303)

* CardinalityIT/NestedIT test failures with concurrent search enabled and AssertingCodec
The tests were failing because during the concurrent segment search for each slice the
codec producers for the leafs were initialized by the slice thread. Later in reduce phase,
the post collection happens over those codec producers on the search thread.
With AssertingCodec it verifies that all access is done by the same thread causing the failures

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Address review comments

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

---------

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…nd AssertingCodec (opensearch-project#8303)

* CardinalityIT/NestedIT test failures with concurrent search enabled and AssertingCodec
The tests were failing because during the concurrent segment search for each slice the
codec producers for the leafs were initialized by the slice thread. Later in reduce phase,
the post collection happens over those codec producers on the search thread.
With AssertingCodec it verifies that all access is done by the same thread causing the failures

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Address review comments

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

---------

Signed-off-by: Sorabh Hamirwasia <sohami.apache@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
backport 2.x Backport to 2.x branch
Projects
None yet
2 participants