When replaying fs-events we would not reload changed items

When we see a changed item we drop it from the cache and mark the cache as “incomplete”, indicating that the bundle index should be rebuilt, which in turn causes all known items to be fetched, and the cache will thereby reload the updated entries.

However, when replaying fs-events, we are in a “rebuild index” state and would not re-rebuild the index incase items were dropped.
This commit is contained in:
Allan Odgaard
2014-02-19 20:11:52 +07:00
parent 4f5f20947a
commit be2eff9825

View File

@@ -328,6 +328,7 @@ static double const kPollInterval = 3*60*60;
D(DBF_BundlesManager, bug("%s\n", BSTR(_needsCreateBundlesIndex)););
if(_needsCreateBundlesIndex == NO)
return;
_needsCreateBundlesIndex = NO;
auto pair = create_bundle_index(bundlesPaths, cache);
bundles::set_index(pair.first, pair.second);
@@ -336,8 +337,6 @@ static double const kPollInterval = 3*60*60;
for(auto path : bundlesPaths)
cache.copy_heads_for_path(path, std::inserter(newWatchList, newWatchList.end()));
[self updateWatchList:newWatchList];
_needsCreateBundlesIndex = NO;
}
- (void)saveBundlesIndex:(id)sender