Early Lock Release: Quarks
[Transactions, Locking and Logging]

Collaboration diagram for Early Lock Release: Quarks:


Detailed Description

A quark is a marker in the transaction's list of acquired locks. One may release all short-duration locks acquired since the quark was inserted into the list via sm_quark_t::open(). The lock manager modifies the locks acquired inside a quark so that non-extent locks are no longer than short-duration.

This is for experimentation only, and is not well-tested or supported.

How used:

 sm_quark_t *q = new sm_quark_t;
 q->open();  // inserts marker in transaction's list.
 ...
 q->close(); // frees short-duration locks to the marker.
 delete q;

Deleting the quark without closing it causes it to be closed. Quarks may not be used with multi-threaded transactions.

Note that if a transaction has multiple threads attached when a thread opens a quark, there is no way to determine where the quark takes effect, and since it affects the locks acquired by all threads of the transaction, it must be used very carefully where multiply-threaded transactions are concerned.


Classes

class  sm_quark_t
 List of locks acquired by a transaction since the quark was "opened". More...


Generated on Wed Jul 7 17:22:37 2010 for Shore Storage Manager by  doxygen 1.4.7