Bug #4968

[FUSE] Project directories do not refresh.

Added by Peter Amstutz over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Start date:
01/13/2015
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
0.5

Description

Project directories are supposed to refresh every 60 seconds, but do not.


Subtasks

Task #4969: Review 4968-refresh-project-dirResolvedPeter Amstutz

Associated revisions

Revision fa82df2e
Added by Peter Amstutz over 5 years ago

Merge branch '4968-refresh-project-dir' closes #4968

History

#1 Updated by Peter Amstutz over 5 years ago

  • Description updated (diff)
  • Category set to SDKs
  • Assigned To set to Peter Amstutz

#2 Updated by Brett Smith over 5 years ago

Reviewing f4e61aa.

The polling-related changes are fine. The bit to have the directory refresh when .arvados#project is opened seems really underdone, though. Given that we update after just sixty seconds, do we really need another knob? How is the user supposed to discover it? Why does it work for projects but not other kinds of directories? Isn't it going to be kind of rough in the case where the first thing the user does is recursively read the directory, since that will mean it makes two API calls back-to-back, with all the associated overhead? Why are you adding a new feature in what is ostensibly a bugfix branch?

My only comment about the code itself is that open_hook might be a clearer name for the method than opening, plus the usual PEP 8 comment about having two blank lines after a class definition (applies to both File, and both ends of UpdateOnOpenFile). Thanks.

#3 Updated by Peter Amstutz over 5 years ago

The idea was something like this

  1. Program is listening to event bus
  2. Program gets an event indicating that the project has changed
  3. Program is going to do some work involving the project directory
  4. Trigger a refresh by reading ".arvados#project" so the work is using an up-to-date project directory.

I agree that this is a hack, so I am backing out f4e61aa027412141fe3d77123414e07fe81ef424 the branch is now on 2185f76a9aeb9fbde23e189cda1db4dcc0949177

A better way to do this would be to get update events directly from the file system -- possibly using inotify()

#4 Updated by Brett Smith over 5 years ago

2185f76a9 is good to merge, thanks.

#5 Updated by Peter Amstutz over 5 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:fa82df2ec3cab51eaaadd2a31b457d0e2ceafbcb.

#6 Updated by Ward Vandewege over 5 years ago

  • Story points set to 0.5

Also available in: Atom PDF