On Monday 14 July 2008 12:48, Matthew Toseland wrote:
> On Monday 14 July 2008 06:56, Daniel Cheng wrote:
> > On Sun, Jul 13, 2008 at 1:38 AM,  <toad at freenetproject.org> wrote:
> > > Author: toad
> > > Date: 2008-07-12 17:38:13 +0000 (Sat, 12 Jul 2008)
> > > New Revision: 21115
> > >
> > > Modified:
> > >   
> 
branches/db4o/freenet/src/freenet/support/io/PersistentEncryptedTempBucketFactory.java
> > > Log:
> > > Document another anti-OOM hack.
> > >
> > > Modified: 
> 
branches/db4o/freenet/src/freenet/support/io/PersistentEncryptedTempBucketFactory.java
> > > ===================================================================
> > > --- 
> 
branches/db4o/freenet/src/freenet/support/io/PersistentEncryptedTempBucketFactory.java
      
> 2008-07-12 17:29:21 UTC (rev 21114)
> > > +++ 
> 
branches/db4o/freenet/src/freenet/support/io/PersistentEncryptedTempBucketFactory.java
      
> 2008-07-12 17:38:13 UTC (rev 21115)
> > > @@ -33,6 +33,10 @@
> > >  //                             return bf.bf == 
> persistentTempBucketFactory;
> > >  //                     }
> > >  //             });
> > > +               // REDFLAG:
> > > +               // Constraining on bf causes an OOM for Cooo on db4o 
> 6.4.48.10991. Commenting out bf below fixes it.
> > > +               // Neither of the below log messages was logged ... 
which 
> suggests something very strange is happening in db4o.
> > 
> > db4o do a query-by-example on constrain() ---- all primitive field /
> > string are compared, null fields are ignored, some other object might
> > work (i have no idea on when would it work). It does not expect you
> > specifying a complex object there.
> 
> Then how do you constrain to an exact value? Db4o's indexes are all by exact 
> pointer, never by value.

identity(). DOH!
> > 
> > persistentTempBucketFactory have a Random / RandomSource field, which
> > can be problematic.
> 
> It's transient.
> > 
> > > +               // FIXME EVIL DB4O BUG - if can replicate, file a bug... 
> but it didn't happen to me, on the same version, also on linux, so it may 
not 
> be replicable.
> > >                Query query = container.query();
> > >                
> query.constrain(PersistentEncryptedTempBucketFactory.class);
> > 
> 
>                //query.descend("bf").constrain(persistentTempBucketFactory);
> > 
> > and use a .and() here.
> 
> Doh! That may be what I've been missing in several places.
> 
> If you don't do and(), what happens?
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080714/eda3cca7/attachment.pgp>

Reply via email to