This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#163
Description of changes:
This PR changes the way in which we build the JNI library artifacts we release with Opendistro. Previously, we compiled the NMSLIB portion of the library with
-march=native
. The problem with this is that the machine the Github runner used, had optimized instruction sets that are not present on other machines a user might run the plugin on. This would then lead to an unexpected crash.This PR changes
-march=native
to the more generic-march=x86-64
compile option, providing more general compatibility for our library. However, this may lead some users to get worse performance than they otherwise expected, because the distributed binary will no longer include optimized instructions. For users to avoid this, they should build the library from source in an environment that mirrors their production environment. This PR adds this suggestion in the README as well.In order to test, I built the RPM on an Amazon Linux 2 machine on an m5.xlarge EC2 instance and then installed it on an m4.xlarge instance. I was able to confirm that the steps from #163 that led to the crash earlier, did not lead to a crash with this method.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.