英文:
Removing lock on non-graceful application shutdown
问题
与这个问题相关的链接: https://stackoverflow.com/questions/62012463/remove-lock-on-environment-at-every-transaction-end 和 https://stackoverflow.com/questions/63211112/how-does-jetbrains-youtrack-server-scales-over-load/63757843#63757843
有什么方法可以实现让 Xodus 锁定机制在非优雅应用程序关闭时也能正常工作?例如,如果应用程序进程(已经打开了对 Xodus 环境的写访问权限)被终止,锁定将会保留,新的应用程序进程就无法再写入数据库,因为存在 .lck
文件,因此需要手动执行 find . -name "xd.lck" -type f -delete
命令才能使其恢复正常工作。
此外,对于多进程的 Servlet 容器/服务器,它会生成同一应用程序的多个进程。因此问题是,Xodus 锁定机制如何能够很好地处理这些情况?
英文:
Related to this question: https://stackoverflow.com/questions/62012463/remove-lock-on-environment-at-every-transaction-end and https://stackoverflow.com/questions/63211112/how-does-jetbrains-youtrack-server-scales-over-load/63757843#63757843
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 kill
ed, 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?
答案1
得分: 1
锁定会在“已终止打开了对 Xodus 环境写访问权限的应用程序进程”的后立即释放。
英文:
The lock is immediately released after "the application process (which opened write access to a Xodus environment) is killed".
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论