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

docCountError must be 0 for shard level reduce #9246

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

jed326
Copy link
Collaborator

@jed326 jed326 commented Aug 11, 2023

Description

After #8860, the shard_size parameters are not applied until the shard level reduce. This means that no bucket candidates will be eliminated until the reduce phase, which also means there should be no doc_count_error at the slice level reduce. This change fixes that and the test failures in #9209

Related Issues

Resolves #9209

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.

@jed326
Copy link
Collaborator Author

jed326 commented Aug 11, 2023

@reta @sohami could you please help review? I didn't add a changelog line since this isn't modifying any existing behavior, I see it instead as a bug fix for an unreleased experimental feature. Thanks!

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



> Task :checkCompatibility
Incompatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, 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/index-management.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/ml-commons.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/common-utils.git, https://github.com/opensearch-project/reporting.git]
Compatible components: [https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/performance-analyzer-rca.git]

BUILD SUCCESSFUL in 21m 51s

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

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

@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #9246 (0a709f3) into main (7278f43) will decrease coverage by 0.08%.
Report is 19 commits behind head on main.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##               main    #9246      +/-   ##
============================================
- Coverage     71.09%   71.01%   -0.08%     
+ Complexity    57364    57265      -99     
============================================
  Files          4770     4770              
  Lines        270548   270548              
  Branches      39563    39563              
============================================
- Hits         192334   192135     -199     
- Misses        62036    62157     +121     
- Partials      16178    16256      +78     
Files Changed Coverage Δ
...earch/aggregations/bucket/terms/InternalTerms.java 87.76% <50.00%> (+0.42%) ⬆️

... and 475 files with indirect coverage changes

Signed-off-by: Jay Deng <jayd0104@gmail.com>
@jed326
Copy link
Collaborator Author

jed326 commented Aug 11, 2023

@reta @sohami updated the code comment. Let me know what you think!

@reta
Copy link
Collaborator

reta commented Aug 11, 2023

@reta @sohami updated the code comment. Let me know what you think!

LGTM but would prefer @sohami to signoff here, thanks @jed326 !

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



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

BUILD SUCCESSFUL in 23m 23s

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Collaborator

@sohami sohami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @jed326

@sohami sohami merged commit db768d1 into opensearch-project:main Aug 12, 2023
@sohami sohami added the backport 2.x Backport to 2.x branch label Aug 12, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 12, 2023
Signed-off-by: Jay Deng <jayd0104@gmail.com>
(cherry picked from commit db768d1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Aug 12, 2023
(cherry picked from commit db768d1)

Signed-off-by: Jay Deng <jayd0104@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
linuxpi pushed a commit to linuxpi/OpenSearch that referenced this pull request Aug 14, 2023
linuxpi pushed a commit to linuxpi/OpenSearch that referenced this pull request Aug 16, 2023
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
Signed-off-by: Jay Deng <jayd0104@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@jed326 jed326 deleted the doc-error-fix branch September 13, 2023 19:10
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
Signed-off-by: Jay Deng <jayd0104@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
Signed-off-by: Jay Deng <jayd0104@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 skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Concurrent Segment Search] Terms Agg Doc Count Error needs to be calculated across shards instead of slices
3 participants