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

Davide Giannella commented on OAK-3529:
---------------------------------------

[~mreutegg], [~mduerig]

provided a new [patch|^OAK-3529-4.patch]. Minor changes around javadocs.

bq. The DocumentNodeStore part looks OK.

Great!

bq. The JavaDoc for getInstanceId() also mentions "It may be the same as a 
cluster id.". What exactly is a cluster id? I think it would be good to add a 
reference to the JavaDoc that points to the definition.

I've added a reference. Is it ok?

bq. I'm also not too happy with the method on the builders. It is undefined 
when the methods return a non-null value. This makes it impossible to use 
reliably.

We need a way to let the builder knows about this id as it will be potentially 
used during repository constructions of plain java objects for commit hooks. 
For example the upcoming atomic counter. There's currently no other way to have 
access to the underlying NodeStore when we construct  a repository in the {{new 
Jcr(...)}}.

I don't know as well whether that is the right approach, as in theory the 
{{Clusterable}} behavior could be implemented by something else that is not a 
NodeStore. In the meantime i added a more specific javadoc around it (see 
patch); but I'm wondering if we should expose something like 
{{.with(Clusterable)}} and use it from within the Jcr and Oak objects.

In terms of OSGi this is clear as the commit hooks or who ever need the 
instanceId could reference a Service.

> NodeStore API should expose an Instance ID
> ------------------------------------------
>
>                 Key: OAK-3529
>                 URL: https://issues.apache.org/jira/browse/OAK-3529
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Davide Giannella
>            Assignee: Davide Giannella
>             Fix For: 1.4
>
>         Attachments: OAK-3529-1.patch, OAK-3529-2.patch, OAK-3529-3.patch, 
> OAK-3529-4.patch
>
>
> For better leveraging cluster oriented algorithm: discovery, atomic
> operations; it would be very helpful if the NodeStore could expose a
> unique instance id.
> This can be the same as a cluster ID.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to