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

Fixed single shard pagination issue of from #1140

Merged

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Jan 24, 2025

Description

For the initial searchRequest, it creates a default search context which sets the value of from to 0 if it's -1. That's not the case with SearchPhasedContext, that's why need to explicitly set to 0 for the single shard case
Ref: https://github.com/opensearch-project/OpenSearch/blob/2.18/server/src/main/java/org/opensearch/search/DefaultSearchContext.java#L288 and #1139

Related Issues

Resolves #1139

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

Copy link
Member

@martin-gaievski martin-gaievski left a comment

Choose a reason for hiding this comment

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

overall looks good, please address my comment and I'll aprove

CHANGELOG.md Outdated Show resolved Hide resolved
@martin-gaievski martin-gaievski added backport 2.x Label will add auto workflow to backport PR to 2.x branch v2.19.0 labels Jan 24, 2025
@martin-gaievski martin-gaievski dismissed their stale review January 24, 2025 16:48

BWC tests are constantly failing, need to make a proper deep dive before we can approve this PR

@martin-gaievski
Copy link
Member

martin-gaievski commented Jan 24, 2025

@owaiskazi19 can you please check the failing BWC? It doesn't relate to latest core wobbles between lucene 9 and 10, and I've restarted it several times, so it's not a flaky test

@ryanbogan
Copy link
Member

LGTM once CI is passing

@vibrantvarun
Copy link
Member

@owaiskazi19 can you please check the failing BWC? It doesn't relate to latest core wobbles between lucene 9 and 10, and I've restarted it several times, so it's not a flaky test

I see BatchIngestionIT are failing constantly.

@owaiskazi19
Copy link
Member Author

@owaiskazi19 can you please check the failing BWC? It doesn't relate to latest core wobbles between lucene 9 and 10, and I've restarted it several times, so it's not a flaky test

Rolling upgrade BWC tests are passing for me on local


BUILD SUCCESSFUL in 7m 15s
40 actionable tasks: 28 executed, 12 up-to-date

@vibrantvarun
Copy link
Member

Logged the bug #1142

@vibrantvarun
Copy link
Member

@martin-gaievski I think we can merge this PR contains changes which are unrelated to BatchIngestionIT.

@owaiskazi19
Copy link
Member Author

To double confirm ran the failing test separately

./gradlew ':qa:rolling-upgrade:testAgainstOneThirdUpgradedCluster' --tests "org.opensearch.neuralsearch.bwc.rolling.BatchIngestionIT.testBatchIngestion_SparseEncodingProcessor_E2EFlow" -Dtests.seed=801B4B74838557A -Dtests.security.manager=false -Dtests.bwc.version=2.19.0-SNAPSHOT -Dtests.locale=sw-TZ -Dtests.timezone=America/Bahia_Banderas -Druntime.java=21
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.9
  OS Info               : Mac OS X 15.2 (aarch64)
  Runtime JDK Version   : 21 (Oracle JDK)
  Runtime java.home     : /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home
  Gradle JDK Version    : 21 (Oracle JDK)
  Gradle java.home      : /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home
  Random Testing Seed   : 801B4B74838557A
  In FIPS 140 mode      : false
=======================================

> Task :generatePomFileForNebulaPublication
Maven publication 'nebula' pom metadata warnings (silence with 'suppressPomMetadataWarningsFor(variant)'):
  - Variant testFixturesApiElements:
      - Declares capability org.opensearch:neural-search-test-fixtures:3.0.0.0-SNAPSHOT which cannot be mapped to Maven
  - Variant testFixturesRuntimeElements:
      - Declares capability org.opensearch:neural-search-test-fixtures:3.0.0.0-SNAPSHOT which cannot be mapped to Maven
These issues indicate information that is lost in the published 'pom' metadata file, which may be an issue if the published library is consumed by an old Gradle version or Apache Maven.
The 'module' metadata file, which is used by Gradle 6+ is not affected.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.9/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 3m 39s

@martin-gaievski
Copy link
Member

Makes sense, let's see if the issue with BWC is there for 2.x/2.19 branch

@martin-gaievski martin-gaievski merged commit c6b8ac4 into opensearch-project:main Jan 24, 2025
39 of 41 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 24, 2025
Signed-off-by: Owais <[email protected]>
(cherry picked from commit c6b8ac4)
martin-gaievski pushed a commit that referenced this pull request Jan 24, 2025
Signed-off-by: Owais <[email protected]>
(cherry picked from commit c6b8ac4)

Co-authored-by: Owais Kazi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Label will add auto workflow to backport PR to 2.x branch bug Something isn't working hybrid search v2.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Hybrid Search with single shard fails intermittently
4 participants