jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Maximum child node limit
Date Wed, 09 Aug 2006 14:32:43 GMT
On 8/9/06, Graeme Wilkinson <graemew@enigma-interactive.co.uk> wrote:
> I'm just using jackrabbit "straight out of the box" so it's the
> DerbyPersistenceManager using the LocalFileSystem

you seem to have hit the size limit of the 'blob' table column.

i quickly ran a test and i was able to add approx, 45k child nodes
before save() failed with an exception. your log file should contain entries
like

ERROR 22001: A truncation error was encountered trying to shrink BLOB
'XX-RESOLVE-XX' to length 1048576.

the max. number of child nodes you can have depends on the size of the
serialized node state (i.e. length of child node entries etc.) and the size
of the database column that holds the serialized node state.

the following line the default schema for derby (derby.ddl) creates
the table that holds node data:

create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null,
NODE_DATA blob not null)

the default size of the blob datatype is 1048576 (1mb). you can easily
increase this size
by specifying e.g. :

create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null,
NODE_DATA blob(5M) not null)

your test should now fail after successfully adding approx. 5x more child nodes.

however, please note that flat hierarchies (say more than 10k child
nodes per node) are not recommended in jackrabbit for a number of
reasons, one being negative performance impact.

cheers
stefan

>
> I'll think I'll start to experiment with persistance managers.
>
> Cheers,
> Graeme
>
> -----Original Message-----
> From: Stefan Guggisberg [mailto:stefan.guggisberg@gmail.com]
> Sent: 09 August 2006 11:07
> To: users@jackrabbit.apache.org
> Subject: Re: Maximum child node limit
>
> hi graeme,
>
> On 8/9/06, Graeme Wilkinson <graemew@enigma-interactive.co.uk> wrote:
> > Is there a limit to the number of child nodes a node can have? I have
>
> logically no, physically yes (depending on the choice of persistence
> manager.
>
> what persistence manager did you use?
>
> cheers
> stefan
>
> > been doing some performance testing where I have just been repeatedly
> > adding new child nodes under the root node. I now get an
> > ItemNotFoundExecption whenever I try and add another node (using the
> > following code)
> >
> > newNode = myRoot.addNode( "myNode" );
> > newNode.addMixin( "mix:referenceable" ); mySession.save();
> >
> > On the call to save() an ItemNotFoundException is thrown. The UUID in
> > the message of the exception is different each time (see partial
> > stacktrace) so it would seem that is it creating something. The path
> > of my last node is /myNode[22687] (there are other nodes under the
> > root which is probably why 22687 is such an arbitrary number) and this
>
> > never changes no matter how many times I try and create a new node.
> > Interestingly, if I delete an existing node I can then create a new
> > node, which is what has led me to believe there is a limit to the
> > number of child nodes.
> >
> > Cheers,
> >
> > Graeme
> >
> >
> >
> > STACKTRACE
> >
> > javax.jcr.ItemNotFoundException:
> > 20d7a630-92d9-4e06-b726-b5ec2d28c976/{http://www.jcp.org/jcr/1.0}prima
> > ry
> > Type at org.ap......
> >
> >
>
>
>

Mime
View raw message