-
Notifications
You must be signed in to change notification settings - Fork 624
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
Do Not Use Lock File #1140
Comments
For additional context, I came across a scenario where a service on a host was stuck in a fail-retry loop. It ended up filling up the drive of the host with these files and knocked out all other services on the host as a result. |
I've been looking at this question quite a bit in-depth. The biggest issue in my mind is trying to cleanup after oneself in failure scenarios. I think the answer is: you don't. As things stand, every time the application starts, this library scans the entire contents of the If you are using an application that is transient: short-lived docker container, or AWS Lambda, then the auto-discovery feature seems perfectly fine and simplifies things for you. If you are running this from a CLI, or from multiple JVMs concurrently (and you're not shipping your own copy of the sqlitejdbc file), I think it would be most helpful to instead re-use any |
PR welcome |
Describe the bug
The SQLiteJDBCLoader class uses a "lock file" to determine when a process is using a SQLite binary library file. The lock file is unreliable, it may leak the lock file, and therefore may allow many instances of the SQLite binary library files to accumulate in the
/tmp
directory.https://docs.oracle.com/javase/8/docs/api/java/io/File.html#deleteOnExit--
Expected behavior
Unused copies of the SQLite binary files are cleaned up reliably.
The text was updated successfully, but these errors were encountered: