Project

General

Profile

Actions

Bug #4770

closed

[Workbench] after file upload, the files tab should refresh immediately (overriding the 15 second throttle)

Added by Ward Vandewege over 9 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assigned To:
-
Category:
Workbench
Target version:
-
Story points:
0.5
Actions #1

Updated by Brett Smith over 9 years ago

I haven't quite figured out how it works yet, but new files do appear in the Files tab. It doesn't reload the whole tab; instead it's a little more targeted (Websockets?). But they definitely appear after a few moments, even if you previously loaded the Files tab before uploading.

Actions #2

Updated by Tom Clegg over 9 years ago

  • Category set to Workbench

My first guess is this is a timing issue:

  1. Hit Files tab. Files tab loads at t=0
  2. Hit Upload tab. Upload tab loads at t=2
  3. Choose a file and upload it. Upload finishes at t=8
  4. Hit Files tab. Files tab was already loaded <15s ago, so refresh is deferred

After this sort of sequence, you have to wait <= 15 seconds before the Files tab gets refreshed.

If your Files tab isn't updated and
  • you have to wait more than { 15 seconds - time since you saw the Files tab }, or
  • you never looked at the Files tab at all between loading the page and finishing your upload

...then there's a bug to track down. (Or perhaps this is a #4706 symptom.)

Either way, I think it would be appropriate for the "upload finished" event to override the usual 15-second minimum refresh delay so you don't have to look at mysteriously old content even for a few seconds.

Actions #3

Updated by Tom Clegg over 9 years ago

How it works:
  • At the end of the upload process, there's a collections.update API call
  • The update causes a Log
  • Postgres notifies websocket server threads about the Log
  • Websocket server sends Log to browser
  • event_log.js sends event to Files tab because it has .arv-log-event-listener[data-object-uuid={collection-uuid}]
  • tab_panes.js either reloads the tab, or sets a timer to reload the tab (depending on time since last load)
Actions #4

Updated by Tom Clegg over 9 years ago

Brett pointed out that the bug could have been produced by a race condition:

  1. Initiate tab refresh
  2. Workbench prepares current tab content
  3. Collection gets modified, websocket event arrives. Refresh is underway so the event is ignored.
  4. Tab content arrives via AJAX
  5. Tab "loaded" time is set to now, no update request is pending, tab content stays stale.

We should make sure this sort of sequence is handled correctly.

Actions #5

Updated by Tom Clegg over 9 years ago

  • Target version changed from Bug Triage to Arvados Future Sprints
Actions #6

Updated by Tom Clegg about 9 years ago

  • Subject changed from [Workbench] after file upload from workbench, going back to the files tab does not automatically refresh the file list to show the newly uploaded files to [Workbench] after file upload, the files tab should refresh immediately (overriding the 15 second throttle)
Actions #7

Updated by Tom Clegg about 9 years ago

  • Target version changed from Arvados Future Sprints to 2015-01-28 Sprint
Actions #8

Updated by Radhika Chippada about 9 years ago

  • Assigned To set to Radhika Chippada
Actions #9

Updated by Tom Clegg about 9 years ago

  • Target version changed from 2015-01-28 Sprint to Arvados Future Sprints
Actions #10

Updated by Radhika Chippada almost 8 years ago

  • Assigned To deleted (Radhika Chippada)
Actions #11

Updated by Ward Vandewege over 2 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #12

Updated by Peter Amstutz about 1 year ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF