Skip to content

fix testJVectorKnnIndex_simpleCase - #692

Merged
reta merged 2 commits into
opensearch-project:mainfrom
ergunkezer1:issue-304-ek-ft
Aug 18, 2026
Merged

fix testJVectorKnnIndex_simpleCase#692
reta merged 2 commits into
opensearch-project:mainfrom
ergunkezer1:issue-304-ek-ft

Conversation

@ergunkezer1

Copy link
Copy Markdown
Contributor

Description

The problem was when

totalNumberOfDocs / maxDoc has remainder old solution was working fine. However, when there is no remainder adding +1 was causing error. For example, 2 doc and 10 maxDoc.

Related Issues

Resolves #304

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.

Testing

./gradlew test --tests KNNJVectorTests.testJVectorKnnIndex_simpleCase -Dtests.iters=7000

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.

ergun-kezer added 2 commits August 18, 2026 14:46
Signed-off-by: ergun-kezer <ergun.kezer@ibm.com>
Signed-off-by: ergun-kezer <ergun.kezer@ibm.com>

@reta reta left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks a lot @ergunkezer1 !

@reta
reta merged commit 65c0eef into opensearch-project:main Aug 18, 2026
42 of 44 checks passed
@opensearch-ci-bot

Copy link
Copy Markdown
Contributor

The backport to 3.7 failed. Please backport manually. See failed workflow run: https://github.com/opensearch-project/opensearch-jvector/actions/runs/32147034808

reta pushed a commit that referenced this pull request Aug 18, 2026
* chore: fix flaky testJVectorKnnIndex_simpleCase test



* doc: update changelog



---------



(cherry picked from commit 65c0eef)

Signed-off-by: ergun-kezer <ergun.kezer@ibm.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Ergün Kezer <ergkezer@gmail.com>
Co-authored-by: ergun-kezer <ergun.kezer@ibm.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] Fix flaky org.opensearch.knn.index.codec.jvector.KNNJVectorTests.testJVectorKnnIndex_simpleCase

3 participants