Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 218216 - [engine] Safety of parallel provisioning operations
Summary: [engine] Safety of parallel provisioning operations
Status: RESOLVED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 236493 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-07 12:12 EST by Susan McCourt CLA
Modified: 2009-09-03 12:49 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2008-02-07 12:12:46 EST
Currently the UI does nothing to prevent a user from initiating several provisioning operations at once (install A, update B, uninstall C, etc.)  It just starts a job for each provisioning operation.  

Is this safe?
Do we need scheduling rules to queue these up?
Comment 1 John Arthorne CLA 2008-02-07 12:22:51 EST
The engine has some basic locking to protect itself, but we should have scheduling rules to improve the end user experience.  Currently the subsequent operations would start and then immediately be blocked. With a scheduling rule, the job wouldn't even be started until the profile rule was available. Simply making IProfile extend ISchedulingRule is likely sufficient.
Comment 2 Susan McCourt CLA 2008-02-07 12:54:54 EST
Agree.  The implementation of the scheduling rule in Profile would need to based on the profile id, since the profile instances themselves are just snapshots in time.
Comment 3 Susan McCourt CLA 2008-06-10 19:20:45 EDT
*** Bug 236493 has been marked as a duplicate of this bug. ***
Comment 4 Susan McCourt CLA 2008-06-10 19:22:41 EDT
status update:
In 3.4, we ended up having the p2 UI prevent the user from performing simultaneous
provisioning operations.  It does this by registering all jobs that modify a
profile with a utility class, and the various buttons in the UI consult this
class to see if a job is already running.  They will remain disabled if a job is already running.  This is not ideal, as it's not clear to the user why they can't perform the operation.

Note we would have to resolve a profile change request just before running the operation, rather than resolving it when the user first requests it.
Comment 5 Susan McCourt CLA 2008-12-09 19:06:29 EST
(In reply to comment #4)
> status update:
> In 3.4, we ended up having the p2 UI prevent the user from performing
> simultaneous
> provisioning operations.  It does this by registering all jobs that modify a
> profile with a utility class, and the various buttons in the UI consult this
> class to see if a job is already running.  They will remain disabled if a job
> is already running.  This is not ideal, as it's not clear to the user why they
> can't perform the operation.
> 
> Note we would have to resolve a profile change request just before running the
> operation, rather than resolving it when the user first requests it.
> 

We are doing a bit better in 3.5 as of M4, per bug 258132.
We now catch this case in the wizard and explain to the user that another install operation is already running.  We also invalidate any precomputed plans so that if the operation were to finish while the user is in the wizard, the resolution would have to be performed again.
Comment 6 Susan McCourt CLA 2008-12-10 16:59:34 EST
per discussion with Pascal, the UI stopping these cases is enough and we aren't planning any core work to address this feature.
Comment 7 Simon Kaegi CLA 2009-09-03 12:49:13 EDT
By the core work you mention I'm guessing you mean the scheduling work. As John mentioned the engine will protect against parallel provisioning operations at that level. I think we can close this.