Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Outdated lock state when releasing a durable lock
[CDO] Outdated lock state when releasing a durable lock [message #1854738] Tue, 06 September 2022 11:32 Go to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
For the following case, it seems like the currently open sessions are not correctly notified about a released lock:

* Lock an object with a view with durable locking (i.e. CDOView#enableDurableLocking)
* Close the view and reopen it
* Release the lock
* The other sessions will still see the object as locked

See attached test case to reproduce the problem (line 57 should fail).

Apart from fixing the issue: is there any workaround to "invalidate" a session to refresh the lock state?
Re: [CDO] Outdated lock state when releasing a durable lock [message #1855352 is a reply to message #1854738] Mon, 10 October 2022 08:45 Go to previous messageGo to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
The workaround for invalidating the lock states seems to be:

((InternalCDOSession)session).getLockStateCache().removeLockStates(view.getBranch());


I could not yet really get an idea of why the lock notification is not being propagated in case of a reopened durable view. The server session seems to correctly process the lock within Session#sendLockNotification, but the client session is not being notified...
Re: [CDO] Outdated lock state when releasing a durable lock [message #1855818 is a reply to message #1855352] Fri, 04 November 2022 16:23 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Robert,

I found the cause of the problem: When a local view changes its "durable" state (durable locking ID, session ID, or view ID) this is reflected in that view's session and in the server. But it's not distributed to other client sessions, so subsequent lock deltas can not be correctly associated with cached lock states.

Please submit a bugzilla and I'll provide a fix...


Re: [CDO] Outdated lock state when releasing a durable lock [message #1855820 is a reply to message #1855818] Fri, 04 November 2022 19:07 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Never mind, I've submitted the bugzilla and committed my fix : https://bugs.eclipse.org/bugs/show_bug.cgi?id=580991

Re: [CDO] Outdated lock state when releasing a durable lock [message #1855872 is a reply to message #1855820] Tue, 08 November 2022 15:10 Go to previous messageGo to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
Thank you very much for this fix! I saw that it did require some larger code change. On the good side, I tested the new build and everything works as expected now!
Re: [CDO] Outdated lock state when releasing a durable lock [message #1855876 is a reply to message #1855872] Tue, 08 November 2022 17:06 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Glad to hear that ;-)


Previous Topic:[CDO] ChangedInTargetAndDetachedInSourceConflict resolution
Next Topic:Compatible versions of emf/eclipse/hibernate with Teneo 2.2.3
Goto Forum:
  


Current Time: Thu Apr 25 12:57:53 GMT 2024

Powered by FUDForum. Page generated in 0.03842 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top