java - 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 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?
解决方案
在“应用程序进程(打开对 Xodus 环境的写访问)被杀死”后立即释放锁。
推荐阅读
- scala - 如何在 spark-scala 中将字符串列(仅包含 time 而不包含 date 的列)转换为 time_stamp?
- php - 根据特定的内部数组值拆分单个数组
- python - Python socket.accept() 在调用之前阻塞代码?
- mysql - ERROR 1064 (42000):您的 SQL 语法有错误;(新鲜的自制软件安装)
- android - 电报重试发送方法
- vagrant - 错误:无效参数 0:json:无法将奇数长度的十六进制字符串解组到 Go struct 字段 SendTxArgs.data 类型的 hexutil.Bytes
- eclipse - Tomcat 未在 Eclipse 中启动 - 没有超时问题 - PFB 日志
- python - 对象类的描述符 __class__ 的 __get__ 未按预期返回
- c++ - 将派生类转换为基类时 dynamic_cast 失败
- angular - 如何解决:“无法解析 accueilComponent 的所有参数”