jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukas Kahwe Smith <sm...@pooteeweet.org>
Subject Re: Atomic path creation
Date Tue, 17 Jun 2014 06:46:27 GMT

On 12 Jun 2014, at 19:29, Kadir Alaca <alaca@web.de> wrote:

> Hello,
> I'm creating nested node structures in a concurrent environment.
> The structure looks like the following:
> ..
> ../myitems/2014/06/12/18/50/07/063/fancyItemWithUniqueName1/..
> ../myitems/2014/06/12/18/50/07/066/fancyItemWithUniqueName2/..
> ../myitems/2014/06/12/18/50/07/069/fancyItemWithUniqueName3/..
> ../myitems/2014/06/12/18/50/07/072/fancyItemWithUniqueName4/..
> ../myitems/2014/06/12/18/50/07/073/fancyItemWithUniqueName5/..
> ../myitems/2014/06/12/18/50/07/083/fancyItemWithUniqueName6/..
> ../myitems/2014/06/12/18/50/07/237/fancyItemWithUniqueName7/..
> ../myitems/2014/06/12/18/50/07[2]/064/fancyItemWithUniqueName8/..
> ..
> All items are from node type NodeType.NT_UNSTRUCTURED.
> As you can see a portion of the path is created from time in milliseconds.
> The reason for nesting the nodes as shown is to optimize retrieval performance.
> What bothers me is the SNS in the created node structure, e.g. in the path of fancyItemWithUniqueName8.
> Until the session is saved i have not full information whether a node already exist or
> Since this is in a concurrent environment with a session per thread,
> how can i create structures like the above without SNS?

you can for one create a new node type that disables SNS. this will then give you an error
instead though which you could then handle by trying another name. you can also reduce the
likely hood by adding another random string.

Lukas Kahwe Smith

View raw message