Author: toad
Date: 2009-03-07 18:24:15 +0000 (Sat, 07 Mar 2009)
New Revision: 25943
Modified:
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
Log:
Fail immediately on internal error, activation/ordering
Modified:
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
2009-03-07 18:23:08 UTC (rev 25942)
+++ branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
2009-03-07 18:24:15 UTC (rev 25943)
@@ -211,7 +211,7 @@
fail(new InsertException(InsertException.COLLISION),
container, context);
break;
case LowLevelPutException.INTERNAL_ERROR:
- errors.inc(InsertException.INTERNAL_ERROR);
+ fail(new
InsertException(InsertException.INTERNAL_ERROR), container, context);
break;
case LowLevelPutException.REJECTED_OVERLOAD:
errors.inc(InsertException.REJECTED_OVERLOAD);
@@ -378,7 +378,6 @@
finished = true;
}
if(persistent) {
- container.activate(cb, 1);
container.store(this);
container.activate(sourceData, 1);
}
@@ -390,8 +389,10 @@
container.store(this);
}
parent.completedBlock(false, container, context);
+ unregister(container, context);
+ if(persistent)
+ container.activate(cb, 1);
if(logMINOR) Logger.minor(this, "Calling onSuccess for "+cb);
- unregister(container, context);
cb.onSuccess(this, container, context);
if(persistent)
container.deactivate(cb, 1);
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs