fix: lib name match with NativeLibraryLoader ROCKSDB_LIBRARY_NAME value #14167
+1
−1
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.
Hi there,
Is it normal that this value is not the same as the ROCKSDB_LIBRARY_NAME in NativeLibraryLoader.java ?
This cause an error if you try to load the .so manually and then load RockDB, see example below :
librocksdbjni-linux64.solibrocksdbjnijni-linux64.so(NB: jnijni)I assume it's not on purpose but let me now if there is a good reason for that !
And if you want to know why I need to load the .so manually :
On securized linux environnement, the /tmp does not allow to dynamically link libs (see this message for more info : docker-flink/docker-flink#46 (comment))
As I can't neither change that or change the java.io.tmpdir to an other path (because I want the rest of my temporary files to stay in the /tmp dir). I'm forced to load the .so manually.
Also I now that I could use the ROCKSDB_SHAREDLIB_DIR environnement variable, but I don't want that my code depends on environments values (for many reasons)
Edit: I find out that by calling RocksDB.loadLibrary() without the path, the function find out that the lib has already been loaded thanks to the "initialized" variable in the NativeLibraryLoader class.