Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Race condition in incremental indexing #115

jfoy opened this Issue Jun 10, 2013 · 5 comments


None yet
7 participants

jfoy commented Jun 10, 2013

Given a geminabox 0.8.3 instance with :incremental_updates enabled
And a data directory /var/geminabox-data
When User A triggers a reindex(:force_rebuild), such as by deleting a gem
And during the reindex User B uploads a gem, triggering an incremental reindex
Then the result of the full reindex will be stored in /var/geminabox-data/quick/Marshal.4.8/Marshal.4.8/*.rz , one directory too deep
And the directory /var/geminabox-data/quick/Marshal.4.8/*.rz will contain only the file resulting from the incremental index
And bundler will return an API error

We fixed this by running mv Marshal.4.8/Marshal.4.8/*.rz Marshal.4.8/.

@jfoy jfoy added a commit that referenced this issue Jul 2, 2013

@jfoy jfoy Merge pull request #117 from whitepages/param_allow_delete
Add allow_delete boolean param; works around #115

Can we assume flock support on the platforms you guys want geminabox to support?

If so, it should be easy to synchronize these methods.

@jfoy — Does this bug exist for simultaneous incremental updates, or only when there is an incremental update that intersects (in time) a full reindex?

I just found this problem on our gem server. The geminabox web interface reports that a gem of a particular version exists but the gem.rz is in the nested Marshal folder. When I try to install it from a remote machine I get an error stating that the gem couldn't be found in any of my sources. Can we expect this to be merged at any point in the near future?

Jfoy & I just implement a fix using flock on the Whitepages fork. I'm looking over all the work that has gone on since we forked with an eye to creating a pull request. The hard part, as always, will be the tests.


This just happened to me so it is still a problem. It happened because deleting a gem is quite slow so I clicked it a second time.

@tomlea tomlea added the Stale label Feb 15, 2016

@tomlea tomlea closed this Feb 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment