opensearch-project / custom-codecs

OpenSearch custom lucene codecs for providing different on-disk index encoding (e.g., compression).
Apache License 2.0
8 stars 15 forks source link

Validating QAT Hardware Support before QAT Codecs are available #169

Closed sarthakaggarwal97 closed 2 months ago

sarthakaggarwal97 commented 2 months ago

Description

Validates that we only load the QAT codecs if QAT library is loaded

Issues Resolved

168

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.

mgodwan commented 2 months ago

@sarthakaggarwal97 Thanks for the PR. Can we check if the SPI registered name is also blocked?

andrross commented 2 months ago

@sarthakaggarwal97 Should we memoize the result of this method into a static boolean? I think that value can't change for the life of the JVM so it should be okay to compute once and store in a static boolean.

andrross commented 2 months ago

@sarthakaggarwal97 Should we memoize the result of this method into a static boolean? I think that value can't change for the life of the JVM so it should be okay to compute once and store in a static boolean.

@sarthakaggarwal97 FYI I pushed a commit to do this

sarthakaggarwal97 commented 2 months ago

@andrross thanks for the commit! looks good to me. We can proceed if you think PR is alright.

opensearch-trigger-bot[bot] commented 2 months ago

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:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/custom-codecs/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/custom-codecs/backport-2.x
# Create a new branch
git switch --create backport/backport-169-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3ab314b7b6e7a8f57d1fc4e565f97fa3104cfbde
# Push it to GitHub
git push --set-upstream origin backport/backport-169-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/custom-codecs/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-169-to-2.x.

opensearch-trigger-bot[bot] commented 2 months ago

The backport to 2.16 failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/custom-codecs/backport-2.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/custom-codecs/backport-2.16
# Create a new branch
git switch --create backport/backport-169-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3ab314b7b6e7a8f57d1fc4e565f97fa3104cfbde
# Push it to GitHub
git push --set-upstream origin backport/backport-169-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/custom-codecs/backport-2.16

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