You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2017/07/05 03:29:00 UTC

[jira] [Commented] (OAK-6419) unique id generator

    [ https://issues.apache.org/jira/browse/OAK-6419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074203#comment-16074203 ] 

Chetan Mehrotra commented on OAK-6419:
--------------------------------------

You can use Clusterable api [1] to get current instance id which can be used to create a unique id. Would that serve your needs?

[1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/Clusterable.java

> unique id generator
> -------------------
>
>                 Key: OAK-6419
>                 URL: https://issues.apache.org/jira/browse/OAK-6419
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>            Reporter: Torgeir Veimo
>            Priority: Minor
>              Labels: counters, locking, sequence
>
> It would be great to have a way to safely generate unique id's for node names, with oak configured in a cluster configuration.
> This is useful for creating unique slug names for documents, and ensuring unique names for node siblings, or node names repository wide.
> It could be implemented as a sequence generator, or similar to how mongodb generates object ids; https://docs.mongodb.org/manual/reference/object-id/. 
> With the older jackrabbit implementation it is possible to have a sequence guaranteed to provide unique id's, using enforceable locks. With oak theres no such guarantee when used in a clustered configuration.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)