...
The Engine defines primitive operations to concurrently access/modify data while maintaining consistency. Since it is desirable to build more complex routines from these operations (while also maintaining consistency in concurrent environments), we must build an AtomicOperation protocol support for atomic operations at the Engine level, which ConcourseServer can use to safely provide implement complex routines to the client.
...
Atomic Operation Support in the Engine
- AtomicOperation is a BufferedStore that transports to the Engine (or a Transaction)
- AtomicOperation uses just in time locking so it never block other operations before it goes to commit
- When committing, AtomicOperation grabs locks to create a fence around the resources on which it will operate. It does not release these locks until it is done committing
- AtomicOperation listens for version changes to the resources that it intends to lock. If it is notified about a version change it fails immediately.
Note |
---|
TODO: may have to move durability up from Transaction to AtomicOperation |
...
Atomic Functions in Concourse Server
All built-in atomic functions must be defined at the Server level and can only mutate using the engine recognized primitive operations defined in AtomicOperation.
...