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

Stefan Egli commented on OAK-9134:
----------------------------------

As mentioned offline I see a risk with having multiple cnd files that they get 
out of sync over time for some reason. It might be worth while to 
discuss/explore feasible alternatives. Eg where we'd have a base cnd file - 
with nt:frozenNode no longer extending mix:referenceable - but conditionally 
somehow allow to get the "{{> mix:referenceable}}" part back.

An initial idea for such an overwrite was to directly, "surgically" modify the 
nt:frozenNode definition.

If that's not possible an alternative might be to have multiple 
{{NodeTypeRegistry.register}} calls, whereby the 2nd is a 
{{"ntFrozenNodeOverwrite.cnd"}} snippet for example. That would still leave us 
with multiple cnd files, but the 2nd one would be tiny and thus hopefully lower 
risk of getting out of sync.

> Remove mix:referenceable from nt:frozenNode definition
> ------------------------------------------------------
>
>                 Key: OAK-9134
>                 URL: https://issues.apache.org/jira/browse/OAK-9134
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, jcr
>            Reporter: José Andrés Cordero Benítez
>            Priority: Minor
>              Labels: patch
>         Attachments: OAK-9134-remove-referenceable-from-test.patch, 
> OAK-9134-remove-referenceable-frozenNode.patch
>
>
> One of the changes between JCR 1.0 and JCR 2.0 is the definition of 
> nt:frozenNode. In JCR 1.0 the node type extends from mix:referenceable, while 
> in JCR 2.0 it does [not 
> anymore|https://docs.adobe.com/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.13.4.1%20nt:frozenNode].
> Oak currently uses a nt:frozenNode definition that extends from 
> mix:referenceable. This adds quite a bit of overhead because each node 
> written under a JCR version gets a jcr:uuid, which is indexed by default.
> The proposal is to remove the supertype "mix:referenceable" from 
> nt:frozenNode.
> Removing this supertype, the frozenNodes wouldn't have a "jcr:uuid" field, 
> which at the end is not used, and allows to reduce the size of the index.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to