Stephan Ewen created FLINK-5408:
-----------------------------------

             Summary: RocksDB initialization can fail with an 
UnsatisfiedLinkError in the presence of multiple classloaders
                 Key: FLINK-5408
                 URL: https://issues.apache.org/jira/browse/FLINK-5408
             Project: Flink
          Issue Type: Bug
          Components: ksDB State Backend
    Affects Versions: 1.2.0
            Reporter: Stephan Ewen
            Assignee: Stephan Ewen
             Fix For: 1.2.0, 1.3.0


When the RocksDB is loaded from different ClassLoaders (for example because it 
is in the user code jar, or loaded dynamically in tests) it may fail with an 
{{"java.lang.UnsatisfiedLinkError: Native Library 
/path/to/temp/dir/librocksdbjni-linux64.so already loaded in another 
classloader}}.

Apparently the JVM can handle multiple instances of the same JNI library being 
loaded in different class loaders, but not when coming from the same file path.

This affects only version 1.2 onward, because from there we extract the JNI 
library into Flink's temp folders to make sure that it gets cleaned up for 
example by YARN when the application finishes. When giving a parent directory, 
RocksDB does not add a unique number sequence to the temp file name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to