Update of /cvsroot/cweb/concurrent/src/java/org/CognitiveWeb/concurrent/locking
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26833/src/java/org/CognitiveWeb/concurrent/locking
Modified Files:
TxDag.java
Log Message:
Mostly have the concurrency test suites running - there is one remaining problem that I have identified when the lock timeout is non-zero (e.g., 1000ms). This seems likely to be a mishandling of the lock timeout exception.
Index: TxDag.java
===================================================================
RCS file: /cvsroot/cweb/concurrent/src/java/org/CognitiveWeb/concurrent/locking/TxDag.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** TxDag.java 3 Oct 2007 19:05:09 -0000 1.12
--- TxDag.java 4 Oct 2007 19:55:30 -0000 1.13
***************
*** 379,383 ****
* would be exceeded if this transaction was added.
*/
-
synchronized int lookup( Object tx, boolean insert )
{
--- 379,382 ----
***************
*** 458,463 ****
*
* @return true iff the vertex was known.
*/
-
synchronized public boolean releaseVertex( Object tx )
{
--- 457,466 ----
*
* @return true iff the vertex was known.
+ *
+ * FIXME Should it be an error if there is an edge remaining for that
+ * vertex? if we do not detect this condition then is is possible that
+ * uncleared edges will remainin in the WAITS_FOR graph and will interfere
+ * with reuse of the recycled index?
*/
synchronized public boolean releaseVertex( Object tx )
{
***************
*** 549,553 ****
* state of the DAG is unchanged if this exception is thrown.
*/
-
synchronized public void addEdge( Object blocked, Object running )
throws DeadlockException
--- 552,555 ----
***************
*** 555,564 ****
// verify arguments some more.
if( running == blocked ) {
! throw new IllegalArgumentException("transaction may not wait for self");
}
final int dst = lookup( running, true );
final int src = lookup( blocked, true );
if( src == dst ) {
! throw new IllegalArgumentException("transaction may not wait for self.");
}
if( W[src][dst] ) {
--- 557,566 ----
// verify arguments some more.
if( running == blocked ) {
! throw new IllegalArgumentException("may not wait for self");
}
final int dst = lookup( running, true );
final int src = lookup( blocked, true );
if( src == dst ) {
! throw new IllegalArgumentException("may not wait for self.");
}
if( W[src][dst] ) {
|