Update of /cvsroot/freenet/freenet/src/freenet/message
In directory sc8-pr-cvs1:/tmp/cvs-serv11480/src/freenet/message
Modified Files:
Tag: ngrouting
DataSend.java
Log Message:
Build 7046:
Main objectives of this build are to improve routing success stats, fix deadlocks and
fix RNFs.
Major ASL bugfix: fix race that could lead to connections getting closed without the
client being notified.
MAJOR *SL work: Zab fixed some *SL deadlocks.
Change logging of success/failure of Routing, to take into account whether or not the
failure was apparently caused by routing. Add new diagnostic vars
requestFailureRoutingOrNotRatio, routingSuccessRatio. Change and consolidate
terminate() calls all over request/. Minor changes all over states/request: Set
insertReplyTime *before* sending it on, comment out logFailure*/logSuccess, update
comments, logging, move *Time assignment after fromLastPeer check in
receivedQueryRestarted (conceivably exploitable to bias stats), make backtracking
QueryRejected async in Pending, make sure IOExceptions from the store are treated
differently to IOExceptions from the network (which are like DNVs) in
Pending.received(,DataReply), consolidate routes.terminate() calls into a function on
RequestState, improve some toString()s, change exactly where we terminate the routing
some places. Reindenting, code restyling
Index: DataSend.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/message/DataSend.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- DataSend.java 30 Jun 2003 21:00:54 -0000 1.4
+++ DataSend.java 29 Aug 2003 18:58:05 -0000 1.4.2.1
@@ -111,13 +111,14 @@
* @param n The node to cache into.
* @param searchKey The key to cache as.
* @return a DataState that will read the data into the store
+ * @exception StoreIOException If writing to the datastore fails.
* @exception IOException If creating the stream to CACHE the data fails.
* @exception DataNotValidIOException If the data does not validate
* for the provided key.
*/
public ReceiveData cacheData(Node n, Key searchKey)
- throws IOException, DataNotValidIOException,
- KeyCollisionException {
+ throws IOException, DataNotValidIOException,
+ KeyCollisionException {
Storables storables = getStorables();
if (storables == null) {
throw new DataNotValidIOException(Presentation.CB_BAD_KEY);
@@ -126,10 +127,15 @@
if(logDEBUG)
Core.logger.log(this, "Trying to cache data: "+searchKey+":"+length+
":"+in, Core.logger.DEBUG);
- KeyOutputStream out = n.ds.putData(searchKey, length, storables);
+ KeyOutputStream out;
+ try {
+ out = n.ds.putData(searchKey, length, storables);
+ } catch (IOException e) {
+ throw new StoreIOException(e);
+ }
return new ReceiveData(n.randSource.nextLong(), this.id, vis, out, length);
}
-
+
/** Used to swallow a DataInsert.
*/
public void eatData(Node n) {
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs