移除在非正常应用程序关闭时的锁定

huangapple go评论70阅读模式
英文:

Removing lock on non-graceful application shutdown

问题

与这个问题相关的链接: https://stackoverflow.com/questions/62012463/remove-lock-on-environment-at-every-transaction-endhttps://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 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?

答案1

得分: 1

锁定会在“已终止打开了对 Xodus 环境写访问权限的应用程序进程”的后立即释放。

英文:

The lock is immediately released after "the application process (which opened write access to a Xodus environment) is killed".

huangapple
  • 本文由 发表于 2020年9月8日 09:27:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/63786000.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定