summaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-15 16:27:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-15 19:00:06 -0400
commitc27c751b34af993a67e04e079d6f860a69f25038 (patch)
treee2c0b001bd4d7c9449fb5d6f246883d5d4b50876 /Config.hs
parent8c7dfc93b523957334c3b93530a85b7dcfa5cfb1 (diff)
preliminary deferring of file adds to commit time
Defer adding files to the annex until commit time, when during a batch operation, a bundle of files will be available. This will allow for checking a them all with a single lsof call. The tricky part is that adding the file causes a symlink change inotify. So I made it wait for an appropriate number of symlink changes to be received before continuing with the commit. This avoids any delay in the commit process. It is possible that some unrelated symlink change is made; if that happens it'll commit it and delay committing the newly added symlink for 1 second. This seems ok. I do rely on the expected symlink change event always being received, but only when the add succeeds. Another way to do it might be to directly stage the symlink, and then ignore the redundant symlink change event. That would involve some redundant work, and perhaps an empty commit, but if this code turns out to have some bug, that'd be the best way to avoid it. FWIW, this change seems to, as a bonus, have produced better grouping of batch changes into single commits. Before, a large batch change would result in a series of commits, with the first containing only one file, and each of the rest bundling a number of files. Now, the added wait for the symlink changes to arrive gives time for additional add changes to be processed, all within the same commit.
Diffstat (limited to 'Config.hs')
0 files changed, 0 insertions, 0 deletions