Skip to main content



      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 07:32 Go to next message
Eclipse UserFriend
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 04:45 Go to previous messageGo to next message
Eclipse UserFriend
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 12:23 Go to previous messageGo to next message
Eclipse UserFriend
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 15:07 Go to previous messageGo to next message
Eclipse UserFriend
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 10:10 Go to previous messageGo to next message
Eclipse UserFriend
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 12:06 Go to previous message
Eclipse UserFriend
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: Sun Jul 13 03:05:04 EDT 2025

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

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

Back to the top