sqlite-jdbc icon indicating copy to clipboard operation
sqlite-jdbc copied to clipboard

NativeDB#load initialization is racy

Open thinred opened this issue 5 years ago • 1 comments

I understand that if multiple threads manage to get to this method, the writes to isLoaded and loadSucceeded will be racy. Some synchronization should be performed around these variables.

See https://github.com/xerial/sqlite-jdbc/blob/ddd8fd3294cb3a8eea5f3e003702dbeb52d3327a/src/main/java/org/sqlite/core/NativeDB.java#L59-L66.

thinred avatar Apr 16 '20 08:04 thinred

Seems like SQLiteJDBCLoader.initialize() is synchronized, so shouldn't be a problem, no?

gotson avatar Jul 28 '22 08:07 gotson