Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339081

Summary: Simple Lock Service
Product: z_Archived Reporter: Gunnar Wagenknecht <gunnar>
Component: gyrexAssignee: Gunnar Wagenknecht <gunnar>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: andreas.mihm
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 329782, 339020    

Description Gunnar Wagenknecht CLA 2011-03-07 08:01:24 EST
We need a lock service in Gyrex which allow to acquire globally synchronized locks. This should be possible out of the box with ZooKeeper. At least, ZooKeeper already has a receipt for it.

The operations should be relatively simple. The lock service allows to created different types of locks. At first, we need an exclusive lock. An exclusive lock can only be held by one client at any point in time. A second lock type might be (recoverable) shared locks.

We also need to decide about lock persistence. Typically, locks should only guarantee durability as long as the cloud connection (eg. ZooKeeper session) is alive. However, there are use cases where we may need durable persistent locks. For example, we may use locks in order to control node software updates. Only one node should update at a single point in time. As part of updates a node reboot might be required. Only after successful reboot we might want to release the lock in order to allow the next node to start updating itself.
Comment 1 Gunnar Wagenknecht CLA 2011-04-14 15:06:23 EDT
There is now a ILockService in Gyrex. It support exclusive (i.e. session) as well as durable locks. An exclusive locks expires when the sessions expires (eg. disconnects). Durable locks don't expire in such a case but break and must be recovered.