Author: j16sdiz
Date: 2009-02-23 08:55:35 +0000 (Mon, 23 Feb 2009)
New Revision: 25765
Modified:
trunk/freenet/
trunk/freenet/src/freenet/client/
trunk/freenet/src/freenet/client/async/SimpleManifestPutter.java
Log:
Merge r25351, r25352 from db4o: maybe related to bug 2486
Property changes on: trunk/freenet
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/db4o:25594
/branches/db4o/freenet:24785,25282,25332,25479,25488,25540,25594
+ /branches/db4o:25594
/branches/db4o/freenet:24785,25282,25332,25351-25352,25479,25488,25540,25594
Property changes on: trunk/freenet/src/freenet/client
___________________________________________________________________
Modified: svn:mergeinfo
-
/branches/db4o/freenet/src/freenet/client:24785,25282,25332,25353,25479,25488,25540,25594
/branches/db4o/src/freenet/client:25594
+
/branches/db4o/freenet/src/freenet/client:24785,25282,25332,25351-25353,25479,25488,25540,25594
/branches/db4o/src/freenet/client:25594
Modified: trunk/freenet/src/freenet/client/async/SimpleManifestPutter.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SimpleManifestPutter.java
2009-02-23 08:44:14 UTC (rev 25764)
+++ trunk/freenet/src/freenet/client/async/SimpleManifestPutter.java
2009-02-23 08:55:35 UTC (rev 25765)
@@ -551,16 +551,27 @@
return ARCHIVE_TYPE.ZIP.mimeTypes[0];
}
- private boolean resolve(MetadataUnresolvedException e) throws
InsertException, IOException {
+ /**
+ * Start inserts for unresolved (too big) Metadata's.
+ * @param e
+ * @return
+ * @throws InsertException
+ * @throws IOException
+ */
+ private void resolve(MetadataUnresolvedException e) throws
InsertException, IOException {
Metadata[] metas = e.mustResolve;
- boolean mustWait = false;
for(int i=0;i<metas.length;i++) {
Metadata m = metas[i];
- if(!m.isResolved())
- mustWait = true;
synchronized(this) {
- if(metadataPuttersByMetadata.containsKey(m))
continue;
+ if(metadataPuttersByMetadata.containsKey(m)) {
+ if(logMINOR) Logger.minor(this,
"Already started insert for "+m+" in resolve() for "+metas.length+"
Metadata's");
+ continue;
+ }
}
+ if(m.isResolved()) {
+ Logger.error(this, "Already resolved: "+m+" in
resolve() - race condition???");
+ continue;
+ }
try {
Bucket b = m.toBucket(ctx.bf);
@@ -576,7 +587,6 @@
resolve(e1);
}
}
- return mustWait;
}
private void namesToByteArrays(HashMap putHandlersByName, HashMap
namesToByteArrays) {
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs