[
https://issues.apache.org/jira/browse/SLING-6227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15628207#comment-15628207
]
Marcel Reutegger commented on SLING-6227:
-----------------------------------------
I think it would be best to define the on-parent-version action on the
sling:chunks node type. This is the node type used for the parent node of the
sling:chunk nodes. The current definition looks like this:
{noformat}
[sling:chunks]
mixin
- sling:fileLength (long)
- sling:length (long)
+ * (sling:chunk) multiple
{noformat}
If we don't want to version the chunks we can set the on-parent-version action
to ignore:
{noformat}
[sling:chunks]
mixin
- sling:fileLength (long) ignore
- sling:length (long) ignore
+ * (sling:chunk) multiple ignore
{noformat}
With your sample data you provided, the frozen node would still have a
jcr:content child node with a jcr:frozenMixinTypes that includes sling:chunks,
but none of the properties and child nodes defined in sling:chunks. Similarly,
on restore of this version the versionable node would have the mixin but none
of the ignored items. I think that's fine, because they are not mandatory.
The change should also be backward compatible, because it does not require
changes to existing data.
> Disable versioning for chunk nodes
> ----------------------------------
>
> Key: SLING-6227
> URL: https://issues.apache.org/jira/browse/SLING-6227
> Project: Sling
> Issue Type: Improvement
> Components: Servlets
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Fix For: Servlets Post 2.3.16
>
>
> While analyzing some customer setup it was found that {{sling:chunk}} nodes
> are getting stored in version store and thus preventing the temporary files
> created from getting garbage collection.
> {noformat}
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_75000000_79999999
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_60000000_64999999
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_45000000_49999999
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_20000000_24999999
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_105000000_109999999
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_110000000_114999999>
> pn
> { jcr:primaryType = nt:frozenNode, jcr:createdBy = admin,
> jcr:frozenPrimaryType = sling:chunk, sling:offset = 110000000, jcr:created =
> 2015-12-10T22:23:13.409-05:00, jcr:frozenUuid =
> 136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/jcr:content/chunk_110000000_114999999,
> jcr:data = {-1 bytes}, jcr:uuid = a98d131c-4892-42d4-aa15-4bb0402b176d }
> {noformat}
> This can be fixed by tweaking the nodetype definition for sling:chunks to
> disable versioning for sling:chunk nodes
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)