Update of /cvsroot/cweb/concurrent/src/java/org/CognitiveWeb/concurrent/locking
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19546/src/java/org/CognitiveWeb/concurrent/locking
Modified Files:
TxDag.java
Log Message:
Fixed all known problems with the basic concurrency control for 2PL using exclusive locks.
Index: TxDag.java
===================================================================
RCS file: /cvsroot/cweb/concurrent/src/java/org/CognitiveWeb/concurrent/locking/TxDag.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** TxDag.java 4 Oct 2007 19:55:30 -0000 1.13
--- TxDag.java 5 Oct 2007 01:14:36 -0000 1.14
***************
*** 1424,1453 ****
/**
! * Remove all edges whose target is <i>tx</i>. This method MUST be used
! * when a running transaction completes (either aborts or commits). After
! * calling this method, the transaction is removed completely from the DAG.
! * Failure to use this method will result in the capacity of the DAG being
! * consumed as vertices will not be recycled.
! *
! * @param tx
! * A transaction.
! *
! * @param waiting
! * When false, caller asserts that this transaction it is NOT
! * waiting on any other transaction. This assertion is used to
! * optimize the update of the path count matrix by simply
! * removing the row and column associated with this transaction.
! * When [waiting == true], a less efficient procedure is used to
! * update the path count matrix.
! * <p>
! * Do NOT specify [waiting == false] unless you <em>know</em>
! * that the transaction is NOT waiting. In general, this
! * knowledge is available to the 2PL locking package.
! *
! * @todo Write test cases for this method. It duplicates much of the logic
! * of {@link #removeEdge(Object, Object)} and therefore must be
! * evaluated separately.
! */
!
synchronized public void removeEdges( Object tx, boolean waiting )
{
--- 1424,1453 ----
/**
! * Remove all edges whose target is <i>tx</i>. This method SHOULD be used
! * when a running transaction completes (either aborts or commits). After
! * calling this method, the transaction is removed completely from the DAG.
! * Failure to use this method will result in the capacity of the DAG being
! * consumed as vertices will not be recycled unless you call
! * {@link #releaseVertex(Object)}.
! *
! * @param tx
! * A transaction.
! *
! * @param waiting
! * When false, caller asserts that this transaction it is NOT
! * waiting on any other transaction. This assertion is used to
! * optimize the update of the path count matrix by simply
! * removing the row and column associated with this transaction.
! * When [waiting == true], a less efficient procedure is used to
! * update the path count matrix.
! * <p>
! * Do NOT specify [waiting == false] unless you <em>know</em>
! * that the transaction is NOT waiting. In general, this
! * knowledge is available to the 2PL locking package.
! *
! * @todo Write test cases for this method. It duplicates much of the logic
! * of {@link #removeEdge(Object, Object)} and therefore must be
! * evaluated separately.
! */
synchronized public void removeEdges( Object tx, boolean waiting )
{
|