Bug 470196 - SessionResourcesSynchronizer should process the actions in batch and a known order.
Summary: SessionResourcesSynchronizer should process the actions in batch and a known ...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-06-15 11:55 EDT by Maxime Porhel CLA
Modified: 2016-06-21 03:32 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Porhel CLA 2015-06-15 11:55:11 EDT
In Bug #470083, the internal method SessionResourcesSynchronizer.getImpactingNewStatuses(Collection<ResourceStatusChange>) has been modified to ensure to return aird files changes after the semantic ones. This allow to be sure that the semantic reload will be done after the aird ones after external changes (a refresh on the workspace after modifications done on several files in another workspace: control, representation creation, ...). 

We might still have issues with several scenario regarding the chosen saving or reloading policies and the exact external changes or conflicts because the chosen actions are processed one after the other following the newStatuses keySet order initially computed from the file name order (see ResourceDeltaVisitor). 

The current behavior works fine when one file is modified. But if we receive a change mixing external changes, deletion ( and conflicts), the sequence of action execution is controlled by the file names/order and not by us. 

Furthermore if we have several resources to reload, several reload runnable are executed on the ted with several potential call to postCommits, saver, ... 

We should improve this situation. 

See org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.statusesChanged(Collection<ResourceStatusChange>)

We should build/analyse the newStatus map and known/specify the order in which we want to handle the newStatuses, then we should process the actions in bath per action type and not per resource.
Comment 1 Pierre-Charles David CLA 2015-06-16 04:57:31 EDT
Agreed, and this is part of a more general area of "workspace integration" and "thread-safe session" that I'll start to look into in the next few days.
Comment 2 Pierre-Charles David CLA 2015-06-23 10:41:26 EDT
Moving out of 3.1, as neither the analysis nor the expected benefits are well-defined enough yet.