Bug 239182 - blocked and queued synch jobs
Summary: blocked and queued synch jobs
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.3   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 253947 (view as bug list)
Depends on:
Blocks: 286590
  Show dependency tree
 
Reported: 2008-07-01 22:44 EDT by Mik Kersten CLA
Modified: 2009-10-15 03:20 EDT (History)
2 users (show)

See Also:


Attachments
blocked jobs (72.10 KB, image/png)
2008-07-01 22:45 EDT, Mik Kersten CLA
no flags Details
avoid queuing of synchronizations (16.09 KB, patch)
2009-10-07 21:00 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (5.58 KB, application/octet-stream)
2009-10-07 21:00 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mik Kersten CLA 2008-07-01 22:44:33 EDT
It looks like one synch job can block others.  See attached screenshot.  If there is a safe way to prevent this might be wroth doing for 3.0.1, otherwise 3.0.2.
Comment 1 Mik Kersten CLA 2008-07-01 22:45:56 EDT
Created attachment 106270 [details]
blocked jobs
Comment 2 Mik Kersten CLA 2008-07-01 22:48:18 EDT
Fyi, I never manually triggered a sync, just submitted a bunch of stuff.  This the first time I've seen this happen. 
Comment 3 Steffen Pingel CLA 2008-07-01 23:37:17 EDT
Every submission to the repository will trigger a synchronization for that repository. That's why you are seeing multiple jobs. A strategy needs to be implemented that schedules at most two jobs at a time.
Comment 4 Mik Kersten CLA 2008-07-02 22:16:15 EDT
Or perhaps we could discard redundant jobs?  
Comment 5 Steffen Pingel CLA 2008-08-22 01:28:55 EDT
This will require additional design discussion. Bumping to next milestone.
Comment 6 Steffen Pingel CLA 2008-11-05 14:20:16 EST
*** Bug 253947 has been marked as a duplicate of this bug. ***
Comment 7 Jörg Thönnes CLA 2009-09-23 06:49:57 EDT
Maybe my new bug 290238 is also a duplicate?
Comment 8 Steffen Pingel CLA 2009-10-07 21:00:52 EDT
Created attachment 149070 [details]
avoid queuing of synchronizations
Comment 9 Steffen Pingel CLA 2009-10-07 21:00:56 EDT
Created attachment 149071 [details]
mylyn/context/zip
Comment 10 Steffen Pingel CLA 2009-10-07 21:05:43 EDT
Shawn, can you sanity check these changes? The SynchronizationScheduler now keeps track of the ongoing background synchronizations and only toggles a flag if a synchronization for a  repository or task is requested that is already in progress. Once the synchronization is complete it checks the flag and restarts if necessary to always ensure that the task list is up to date but it will never schedule multiple background synchronizations for the same subject in parallel.

I have also removed a couple of extraneous refreshes of the task list which makes opening of tasks feel a bit faster.
Comment 11 Shawn Minto CLA 2009-10-07 23:03:19 EDT
These changes look good from what I can see.  I like how you always create a new job and just cancel any old ones.  This is a pretty clean approach compared to any other tracking.
Comment 12 Jörg Thönnes CLA 2009-10-15 02:40:54 EDT
Just to be clear: Do you really cancel the old synchronization and then start a new one?
Steffen says "Once the synchronization is complete it checks the flag and restarts..."
This does not sound like cancelling -- or is it implemented in other ways?
Comment 13 Steffen Pingel CLA 2009-10-15 03:20:17 EDT
Currently the old job is completed and then restarted if necessary. It is not cancelled as not all connectors support that properly. We can consider that as an optimization for the future and possibly add a flag to the connector whether that is supported.