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

Fix Faiss byte vector efficient filter bug #2448

Conversation

naveentatikonda
Copy link
Member

Description

Resolves a bug which is running into NullPointerException when we are computing P * Dimension <= Max_distance_computations for faiss efficient filters using byte vectors.

This is a short term solution, created a separate github issue #2447 to refactor and handle different vector datatypes without branching, to improve the code quality and avoid running into bugs like these.

Related Issues

Resolves #2310

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.

@naveentatikonda naveentatikonda added Bug Fixes Changes to a system or product designed to handle a programming bug/glitch backport main v2.19.0 labels Jan 27, 2025
@naveentatikonda naveentatikonda force-pushed the fix_faiss_byte_filters_bug_2.x branch from 79a587b to c84cfc2 Compare January 27, 2025 17:17
ryanbogan
ryanbogan previously approved these changes Jan 27, 2025
@VijayanB
Copy link
Member

VijayanB commented Jan 27, 2025

Can we also cover benchmark to verify that whether one threshold is good enough or do we need different threshold per vector data type as long term fix?

@naveentatikonda
Copy link
Member Author

Can we also cover benchmark to verify that whether one threshold is good enough or do we need different threshold per vector data type as long term fix?

What threshold are you referring to ?

@VijayanB
Copy link
Member

Can we also cover benchmark to verify that whether one threshold is good enough or do we need different threshold per vector data type as long term fix?

What threshold are you referring to ?

I think it is added as TODO just before your code change

@naveentatikonda naveentatikonda force-pushed the fix_faiss_byte_filters_bug_2.x branch from 102a813 to cf68ce8 Compare January 27, 2025 23:32
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.

looks good, thank you

@naveentatikonda naveentatikonda merged commit 02fdd70 into opensearch-project:2.x Jan 28, 2025
99 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to main failed:

The process '/usr/bin/git' failed with exit code 1

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-main main
# Navigate to the new working tree
cd .worktrees/backport-main
# Create a new branch
git switch --create backport/backport-2448-to-main
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 02fdd70f1a10e9faa290c5a92d2c2dc5db3fe31e
# Push it to GitHub
git push --set-upstream origin backport/backport-2448-to-main
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-main

Then, create a pull request where the base branch is main and the compare/head branch is backport/backport-2448-to-main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport main Bug Fixes Changes to a system or product designed to handle a programming bug/glitch v2.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants