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.

persistentTempBucketFactory have a Random / RandomSource field, which
can be problematic.

> +               // 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.

Reply via email to