-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails when reading broken index file #53
Comments
Time-to-time I have the same issue: "No such file or directory" and then "dump format error(0x1)". |
Hi @Irostovsky, it seems that there is no active development on acts_as_indexed anymore :( |
Pull requests are always welcome, folks. Lots of open-source project maintainers have day jobs too. Recently I have been unable to devote time to AAI. The issue here is that the locking of the index files is not as safe across multiple processes as it could be. This is handled in storage.rb. |
Hi @dougal, |
No insult taken! I do plan to look at this again, the difficulty is in replicating these exceptions as they are race conditions across multiple processes. I wrote an experimental version a few months back using log structured storage, I might push this out as a branch for people to test and report results. Although testing in a production environment is not something I would like to encourage. |
Hi,
We use RefineryCMS-blog which is a simple engine within RefineryCMS.
acts_as_indexed
is used for indexing posts, comments and categories.For example, a
Post
has the declaration (code snippet):We are running
acts_as_indexed-0.7.8
,refinerycms-2.0.9
,refinerycms-blog-2-0-stable
. Refinery 2.0.9 locks us these specific version . We have a lot of Refinery customisations we can't easily upgrade RefineryCMS.This morning we had the below sequence of errors:
1. EOFError: end of file reached
2. Errno::ENOENT: No such file or directory - [rails_root]/tmp/index/production/refinery/blog/post/99_111_109.ind.tmp
3. ArgumentError: dump format error(0x2)
Given the order of errors, I presume that for some reason the index file couldn't be written correctly, which then caused read and write errors.
I have checked the server and we have plenty of hard drive space, there were no deployments at the time and there were no other outages anywhere. I was able to resolve it by deleting the
tmp/index
directory, but in the heat of the moment I forgot to keep a backup of the broken file to investigate it further.We have had the same problem 3 or 4 times in the last 6 months or so it's starting to become a bit of a problem with no known cause or obvious fix.
I realise that you have now moved the codebase onto v0.8.3 but perhaps you could give me some guidance here? Is there anything we can do? It doesn't seem to be a problem with Refinery's integration of acts_as_indexed into their app. Looking at the code there doesn't seem to be any handling of error cases, is it done somewhere else? What should acts_as_indexed do if the index file is somehow corrupted?
Thanks for your help - much appreciated. If you need any other information please let me know.
Dave
The text was updated successfully, but these errors were encountered: