On Saturday 30 August 2008 23:05, Florent Daigni?re wrote:
> * Matthew Toseland <toad at amphibian.dyndns.org> [2008-08-30 22:46:02]:
>
> > Should work but messy. What is maxArchiveSize in the ArchiveManager diff?
> >
>
> One is per-request and the other one is global to all others.
IMHO we should get rid of the global setting, and the config that controls it.
>
> > On Tuesday 26 August 2008 14:14, nextgens at freenetproject.org wrote:
> > > Author: nextgens
> > > Date: 2008-08-26 13:14:49 +0000 (Tue, 26 Aug 2008)
> > > New Revision: 22172
> > >
> > > Modified:
> > > trunk/freenet/src/freenet/client/ArchiveContext.java
> > > trunk/freenet/src/freenet/client/ArchiveManager.java
> > > trunk/freenet/src/freenet/client/FetchContext.java
> > > trunk/freenet/src/freenet/client/async/ClientGetter.java
> > > trunk/freenet/src/freenet/client/async/USKRetriever.java
> > > Log:
> > > Tie fproxy.passthroughMaxSize to node.maxArchiveSize (review needed, I'm
not
> > sure about the client-layer implications here)
> > >
> > > Modified: trunk/freenet/src/freenet/client/ArchiveContext.java
> > > ===================================================================
> > > --- trunk/freenet/src/freenet/client/ArchiveContext.java 2008-08-26
11:13:39
> > UTC (rev 22171)
> > > +++ trunk/freenet/src/freenet/client/ArchiveContext.java 2008-08-26
13:14:49
> > UTC (rev 22172)
> > > @@ -17,9 +17,11 @@
> > >
> > > HashSet soFar = new HashSet();
> > > final int maxArchiveLevels;
> > > + final long maxArchiveSize;
> > >
> > > - public ArchiveContext(int max) {
> > > + public ArchiveContext(long maxArchiveSize, int max) {
> > > this.maxArchiveLevels = max;
> > > + this.maxArchiveSize = maxArchiveSize;
> > > }
> > >
> > > /**
> > >
> > > Modified: trunk/freenet/src/freenet/client/ArchiveManager.java
> > > ===================================================================
> > > --- trunk/freenet/src/freenet/client/ArchiveManager.java 2008-08-26
11:13:39
> > UTC (rev 22171)
> > > +++ trunk/freenet/src/freenet/client/ArchiveManager.java 2008-08-26
13:14:49
> > UTC (rev 22172)
> > > @@ -199,7 +199,7 @@
> > > throwAtExit = true;
> > > ctx.setLastHash(realHash);
> > > }
> > > - if(data.size() > maxArchiveSize)
> > > + if(data.size() > Math.max(maxArchiveSize,
archiveContext.maxArchiveSize))
> > > throw new ArchiveFailureException("Archive too big
> > > ("+data.size()+"
> > > "+maxArchiveSize+")!");
> > > if(archiveType != Metadata.ARCHIVE_ZIP)
> > > throw new ArchiveFailureException("Unknown or
> > > unsupported archive
> > algorithm "+archiveType);
> > >
> > > Modified: trunk/freenet/src/freenet/client/FetchContext.java
> > > ===================================================================
> > > --- trunk/freenet/src/freenet/client/FetchContext.java 2008-08-26
11:13:39
> > UTC (rev 22171)
> > > +++ trunk/freenet/src/freenet/client/FetchContext.java 2008-08-26
13:14:49
> > UTC (rev 22172)
> > > @@ -197,6 +197,7 @@
> > > }
> > >
> > > /** Make public, but just call parent for a field for field copy */
> > > + @Override
> > > public Object clone() {
> > > try {
> > > return super.clone();
> > >
> > > Modified: trunk/freenet/src/freenet/client/async/ClientGetter.java
> > > ===================================================================
> > > --- trunk/freenet/src/freenet/client/async/ClientGetter.java
> > > 2008-08-26
> > 11:13:39 UTC (rev 22171)
> > > +++ trunk/freenet/src/freenet/client/async/ClientGetter.java
> > > 2008-08-26
> > 13:14:49 UTC (rev 22172)
> > > @@ -68,7 +68,7 @@
> > > this.uri = uri;
> > > this.ctx = ctx;
> > > this.finished = false;
> > > - this.actx = new ArchiveContext(ctx.maxArchiveLevels);
> > > + this.actx = new ArchiveContext(ctx.maxTempLength,
ctx.maxArchiveLevels);
> > > this.binaryBlobBucket = binaryBlobBucket;
> > > if(binaryBlobBucket != null) {
> > > binaryBlobKeysAddedAlready = new HashSet();
> > > @@ -217,6 +217,7 @@
> > > }
> > > }
> > >
> > > + @Override
> > > public void cancel() {
> > > boolean logMINOR = Logger.shouldLog(Logger.MINOR, this);
> > > if(logMINOR) Logger.minor(this, "Cancelling "+this);
> > > @@ -273,6 +274,7 @@
> > > return start(true, redirect);
> > > }
> > >
> > > + @Override
> > > public String toString() {
> > > return super.toString()+ ':' +uri;
> > > }
> > >
> > > Modified: trunk/freenet/src/freenet/client/async/USKRetriever.java
> > > ===================================================================
> > > --- trunk/freenet/src/freenet/client/async/USKRetriever.java
> > > 2008-08-26
> > 11:13:39 UTC (rev 22171)
> > > +++ trunk/freenet/src/freenet/client/async/USKRetriever.java
> > > 2008-08-26
> > 13:14:49 UTC (rev 22172)
> > > @@ -42,7 +42,7 @@
> > > FreenetURI uri = key.getSSK(l).getURI();
> > > try {
> > > SingleFileFetcher getter =
> > > - (SingleFileFetcher)
> > > SingleFileFetcher.create(this, this, new
> > ClientMetadata(), uri, ctx, new ArchiveContext(ctx.maxArchiveLevels),
> > > + (SingleFileFetcher)
> > > SingleFileFetcher.create(this, this, new
> > ClientMetadata(), uri, ctx, new ArchiveContext(ctx.maxTempLength,
> > ctx.maxArchiveLevels),
> > > ctx.maxNonSplitfileRetries, 0,
> > > true, l, true, null, false);
> > > getter.schedule();
> > > } catch (MalformedURLException e) {
> > >
> > > _______________________________________________
> > > cvs mailing list
> > > cvs at freenetproject.org
> > > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> > >
> > >
>
>
>
> > _______________________________________________
> > Devl mailing list
> > Devl at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080901/1d038d38/attachment.pgp>