[
https://issues.apache.org/jira/browse/JCR-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978215#action_12978215
]
Thomas Mueller commented on JCR-2857:
-------------------------------------
One solution to ensure uniqueness is to use a unique repository-wide id as the
base or most significant bits of the node id. I think it's better to not change
this base id on each startup. With the patch, it's already possible to emulate
this (set the system property jackrabbit.sequentialNodeId to
<unique-repository-wide-id-msb>/<unique-repository-wide-id-lsb>, for example
"14f0acef/0"). The patch let's you 'test drive' sequential node ids, and
includes the necessary refactoring of the node id generation (the NodeIdFactory
mechanism), but the patch doesn't generate a random base id automatically yet.
I will change that: when the jackrabbit.sequentialNodeId is set to "true", use
a random base id instead of 0/0.
I agree in the long term, it makes sense to let the persistence layer generate
unique node ids. In my J3 prototype this is already implemented. For the
current Jackrabbit code, it would mean a lot of changes because each component
would need to have a reference to the persistence layer, or let the persistence
layer generate node id factories. But I don't think Jackrabbit would be much
faster if the persistence layer generates the node ids - just it would make
sense on an architecture level in the long term. But if we anyway want to
replace the current Jackrabbit code with new code it doesn't make sense to
change that now.
> Support sequential (non-random) node ids
> ----------------------------------------
>
> Key: JCR-2857
> URL: https://issues.apache.org/jira/browse/JCR-2857
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Attachments: jcr-2857.patch
>
>
> Currently, node ids are generated using a (cryptographically secure pseudo-)
> random number generator. This has a many advantages (easy to implement, easy
> to merge nodes from multiple repositories or cluster nodes), but is a
> performance bottleneck for large repositories.
> In addition to generating random node ids, Jackrabbit should support
> generating sequential node ids.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.