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

Change InternalSignificantTerms to only sum shard level counts in final reduce #8735

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

jed326
Copy link
Collaborator

@jed326 jed326 commented Jul 17, 2023

Description

Implements solution 2 from #8703 (comment)

In short: supersetSize and supersetDf are shard level counts that are gathered via count queries. In concurrent segment search these will still be shard level counts rather than segment slice level counts, so we do not want to sum up these counts across segment slices, only at the coordinator level (across shards)

Related Issues

Resolves #8703

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 jed326 force-pushed the sigterms-superset-fix branch 2 times, most recently from eceb1dc to 4625f98 Compare July 17, 2023 22:19
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #8735 (11e49db) into main (57d5e90) will increase coverage by 0.08%.
The diff coverage is 33.33%.

@@             Coverage Diff              @@
##               main    #8735      +/-   ##
============================================
+ Coverage     70.76%   70.84%   +0.08%     
- Complexity    57111    57144      +33     
============================================
  Files          4771     4771              
  Lines        270241   270251      +10     
  Branches      39500    39502       +2     
============================================
+ Hits         191237   191465     +228     
+ Misses        62846    62633     -213     
+ Partials      16158    16153       -5     
Impacted Files Coverage Δ
...va/org/opensearch/search/DefaultSearchContext.java 78.29% <0.00%> (-0.62%) ⬇️
...nsearch/search/internal/FilteredSearchContext.java 8.92% <0.00%> (ø)
.../org/opensearch/search/internal/SearchContext.java 38.00% <ø> (ø)
...gations/bucket/terms/InternalSignificantTerms.java 86.84% <33.33%> (-3.16%) ⬇️
...earch/search/aggregations/InternalAggregation.java 77.02% <50.00%> (-1.55%) ⬇️
...arch/aggregations/AggregationCollectorManager.java 82.75% <100.00%> (ø)

... and 463 files with indirect coverage changes

@jed326 jed326 force-pushed the sigterms-superset-fix branch from 4625f98 to 7566b29 Compare July 18, 2023 00:52
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchTimeoutIT.testSimpleTimeout
      1 org.opensearch.cluster.allocation.AwarenessAllocationIT.testThreeZoneOneReplicaWithForceZoneValueAndLoadAwareness

@jed326 jed326 force-pushed the sigterms-superset-fix branch 2 times, most recently from f6c78b9 to d3e172e Compare July 18, 2023 03:53
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      3 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testPressureServiceStats

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testCancellation
      1 org.opensearch.indices.replication.SegmentReplicationIT.testPitCreatedOnReplica
      1 org.opensearch.indices.replication.SegmentReplicationIT.classMethod

@jed326 jed326 force-pushed the sigterms-superset-fix branch from d3e172e to bb7730e Compare July 18, 2023 18:26
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@jed326 jed326 force-pushed the sigterms-superset-fix branch from bb7730e to 3e66a1e Compare July 18, 2023 18:52
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      2 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testScrollCreatedOnReplica
      2 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.classMethod
      1 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testReplicaHasDiffFilesThanPrimary
      1 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testPressureServiceStats
      1 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testPressureServiceStats

@jed326 jed326 force-pushed the sigterms-superset-fix branch from 3e66a1e to a4ab229 Compare July 18, 2023 21:01
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.snapshots.SnapshotStatusApisIT.testStatusAPIStatsForBackToBackShallowSnapshot
      1 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testPitCreatedOnReplica

@jed326 jed326 force-pushed the sigterms-superset-fix branch from a4ab229 to 0f4bbd5 Compare July 19, 2023 17:09
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 jed326 force-pushed the sigterms-superset-fix branch from 0f4bbd5 to 1f0851c Compare July 19, 2023 17:15
@jed326
Copy link
Collaborator Author

jed326 commented Jul 19, 2023

@reta @andrross could one of you take a look at this PR and merge it if it looks good? Thanks!

@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.SegmentReplicationRemoteStoreIT.testScrollCreatedOnReplica
      1 org.opensearch.indices.replication.SegmentReplicationIT.testScrollCreatedOnReplica

CHANGELOG.md Outdated Show resolved Hide resolved
@jed326 jed326 force-pushed the sigterms-superset-fix branch from 1f0851c to 11e49db Compare July 19, 2023 18:48
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@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-8735-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6cc8da561512890c437ef5c605ad99b575ff858b
# Push it to GitHub
git push --set-upstream origin backport/backport-8735-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-8735-to-2.x.

jed326 added a commit to jed326/OpenSearch that referenced this pull request Jul 20, 2023
andrross pushed a commit that referenced this pull request Jul 21, 2023
baba-devv pushed a commit to baba-devv/OpenSearch that referenced this pull request Jul 29, 2023
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
@jed326 jed326 deleted the sigterms-superset-fix branch September 13, 2023 19:11
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
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 v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Concurrent Segment Search] SignificantTerms agg should not gather bg_count for each slice
3 participants