首页 > 解决方案 > Removing lock on non-graceful application shutdown

问题描述

Related to this question: Remove lock on environment at every transaction end and How does Jetbrains YouTrack server scales over load?

What can be done to implement a way for Xodus Lock Mechanism to work even with non-graceful application shutdown? For instance, if the application process (which opened write access to a Xodus environment) is killed, the lock remains and the new application process cannot write to the database anymore due to the .lck file, so a manual find . -name "xd.lck" -type f -delete needs to be executed to make it work again.

Additionally, this is true also with multi-process servlet containers/servers which spawns multiple processes of the same application. So the question, how can Xodus Locking mechanism play well with these scenarios?

标签: javaxodus

解决方案


在“应用程序进程(打开对 Xodus 环境的写访问)被杀死”后立即释放锁。


推荐阅读