X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/dfe0ec7bfec3fd72cd40d3962e5c8af08d2413d2..a12d68dd2e2646beb4ae68e4dd0825272e279508:/services/fuse/arvados_fuse/__init__.py diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py index 72b0e232d8..1828e150bb 100644 --- a/services/fuse/arvados_fuse/__init__.py +++ b/services/fuse/arvados_fuse/__init__.py @@ -367,9 +367,10 @@ class Operations(llfuse.Operations): return True def listen_for_events(self): - self.events = arvados.events.subscribe(self._api_client, - [["event_type", "in", ["create", "update", "delete"]]], - self.on_event) + self.events = arvados.events.subscribe( + self._api_client, + [["event_type", "in", ["create", "update", "delete"]]], + self.on_event) @catch_exceptions def on_event(self, ev): @@ -510,6 +511,14 @@ class Operations(llfuse.Operations): fh = next(self._filehandles_counter) self._filehandles[fh] = FileHandle(fh, p) self.inodes.touch(p) + + # Normally, we will have received an "update" event if the + # parent collection is stale here. However, even if the parent + # collection hasn't changed, the manifest might have been + # fetched so long ago that the signatures on the data block + # locators have expired. Calling checkupdate() on all + # ancestors ensures the signatures will be refreshed if + # necessary. while p.parent_inode in self.inodes: if p == self.inodes[p.parent_inode]: break