Bug 429130 - Deleting projects that contain representation files with open session
Summary: Deleting projects that contain representation files with open session
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0.0M5   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-02-26 05:52 EST by Felix Dorner CLA
Modified: 2015-06-18 04:47 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 Felix Dorner CLA 2014-02-26 05:52:17 EST
I have noted that when I delete a project that contains an open session, the session is closed _asynchronously_ via the ResourceSyncClientNotifier Job. This has a "weird" implication:

SessionListeners cannot assume that the session resource exists when they receive notifications from the SessionManager. This should be documented somewhere, it's a bit unexpected.

Also, because of this, I don't think that it's actually safe to create/open a session without synchronizing against the client notifier job:

Job.getJobManager().join(ResourceSyncClientNotifier.FAMILY)

or one risks to obtain a "corrupt" session.

But ResourceSyncClientNotifier.FAMILY is internal. Maybe it should be made public? Or perhaps even better: Have the SessionManager join the job internally during getSession()?

I found this while running unit tests like this:

for each stuff : stuffToTest {
 Import project A
 Open session A
 Do stuff
 Delete project A  (without explicitly closing session A)
}
Comment 1 Florian Barbin CLA 2014-02-28 05:44:35 EST
Issue accepted and marked as triaged.
Still to determine in which target version/milestone this will be adressed.