Compass Lucene 索引 PhantomReadLock 错误
我使用 MySQL 存储 Compass 索引,在 RHEL 上使用 Tomcat,但是当我关闭 Tomcat 并重新启动索引进程时,索引时会抛出此错误,并且索引失败:
PhantomReadLock无法获取锁,write.lock/customer-index
也许是因为我关闭了 Tomcat,Compass 中出现了这个错误?经过多次谷歌搜索后,我发现我需要手动删除 write.lock 文件,但我在 Tomcat 临时文件夹中的任何位置都找不到锁定文件。我确实在 MySQL 的客户索引表中获得了一条包含 write.lock 的记录,因此我删除了该行,Compass 开始正确索引,并且不再出现 PhantomReadLock 错误。
我只是想澄清一下——这是解决 write.lock 问题的正确方法还是我需要在关闭 Tomcat 时执行其他操作来删除锁定?
I'm using MySQL to store Compass indexes, with Tomcat on RHEL, but when I shut down Tomcat and restart my indexing process, this error is thrown while indexing, and indexing fails:
PhantomReadLock unable to obtain lock, write.lock/customer-index
Maybe because I shut down Tomcat, this error occurs in Compass? After much Googling around, I found that I need to manually delete the write.lock file, but I couldn't find the lock file anywhere in my Tomcat temp folder. I did get a record with write.lock in my customer-index table in MySQL, so I deleted that row and Compass started indexing properly and the PhantomReadLock error no longer occurs.
I just want to clarify -- is this the correct way to solve this write.lock issue or do I need to do something else to delete the lock while shutting down Tomcat?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在使用 Tomcat 时遇到了同样的问题,我发现了这篇文章: http:// docs.ngdata.com/daisy-kb/443-daisy.html。
我了解到,如果你在关闭 Tomcat 时杀死它(在 Eclipse 中你可以“正确”或不这样做),write.lock 仍然存在,而如果你使用shutdown.sh/bat 脚本,文件被删除,下次重启就干净了。
尽管这是一个老问题,但我希望它可以帮助任何偶然发现它的人。
I've had the same problem using Tomcat and I found this article : http://docs.ngdata.com/daisy-kb/443-daisy.html.
What I learned is that if you just kill Tomcat when you shut it down (in eclipse you can do it "properly" or not), write.lock remains there, whereas if you shut it down using the shutdown.sh/bat script, the file is deleted and next restart is all clean.
Even though this is an old question, I hope it helps anyone finding it by chance.