-
Notifications
You must be signed in to change notification settings - Fork 15
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
Validating QAT Hardware Support before QAT Codecs are available #169
Validating QAT Hardware Support before QAT Codecs are available #169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks straightforward, thanks.
src/main/java/org/opensearch/index/codec/customcodecs/QatDeflate99Codec.java
Show resolved
Hide resolved
@sarthakaggarwal97 Thanks for the PR. Can we check if the SPI registered name is also blocked? |
45e8cda
to
466968d
Compare
Signed-off-by: Sarthak Aggarwal <[email protected]>
466968d
to
1b7205c
Compare
@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. |
src/main/java/org/opensearch/index/codec/customcodecs/CustomCodecPlugin.java
Show resolved
Hide resolved
Signed-off-by: Andrew Ross <[email protected]>
@sarthakaggarwal97 FYI I pushed a commit to do this |
@andrross thanks for the commit! looks good to me. We can proceed if you think PR is alright. |
The backport to
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 |
The backport to
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 |
…search-project#169) * validating QAT hardware support before making codecs available Signed-off-by: Sarthak Aggarwal <[email protected]> * Store result of `isQatAvailable` in static field Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: Sarthak Aggarwal <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit 3ab314b)
…search-project#169) * validating QAT hardware support before making codecs available Signed-off-by: Sarthak Aggarwal <[email protected]> * Store result of `isQatAvailable` in static field Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: Sarthak Aggarwal <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit 3ab314b)
#172) * validating QAT hardware support before making codecs available Signed-off-by: Sarthak Aggarwal <[email protected]> * Store result of `isQatAvailable` in static field Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: Sarthak Aggarwal <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit 3ab314b) Co-authored-by: Sarthak Aggarwal <[email protected]>
#171) * validating QAT hardware support before making codecs available Signed-off-by: Sarthak Aggarwal <[email protected]> * Store result of `isQatAvailable` in static field Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: Sarthak Aggarwal <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit 3ab314b) Co-authored-by: Sarthak Aggarwal <[email protected]>
#172) * validating QAT hardware support before making codecs available Signed-off-by: Sarthak Aggarwal <[email protected]> * Store result of `isQatAvailable` in static field Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: Sarthak Aggarwal <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit 3ab314b) Co-authored-by: Sarthak Aggarwal <[email protected]> (cherry picked from commit 7f5181c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
#172) (#173) * validating QAT hardware support before making codecs available * Store result of `isQatAvailable` in static field --------- (cherry picked from commit 3ab314b) (cherry picked from commit 7f5181c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Sarthak Aggarwal <[email protected]>
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.