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 2016/07/18 07:05:21 UTC
[jira] [Created] (OAK-4567) Define oak:Resource nodetype as non
referenceable alternative to nt:resource
Chetan Mehrotra created OAK-4567:
------------------------------------
Summary: Define oak:Resource nodetype as non referenceable alternative to nt:resource
Key: OAK-4567
URL: https://issues.apache.org/jira/browse/OAK-4567
Project: Jackrabbit Oak
Issue Type: Improvement
Components: core
Reporter: Chetan Mehrotra
Assignee: Chetan Mehrotra
Fix For: 1.6
In most cases where code uses JcrUtils.putFile [1] it leads to
creation of below content structure
{noformat}
+ foo.jpg (nt:file)
+ jcr:content (nt:resource)
- jcr:data
{noformat}
Due to usage of nt:resource each nt:file node creates a entry in uuid
index as nt:resource is referenceable. So if a system has 1M
nt:file nodes then we would have 1M entries in /oak:index/uuid as in
most cases the files are created via [1] and hence all such files are
referenceable
The nodetype defn for nt:file does not mandate that the
requirement for jcr:content being nt:resource. To support such non referenceable files we would define a new nodeType similar to nt:resource but which is non referenceable.
See [2] for related discussion
[1] https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java#L1062
[2] http://jackrabbit-oak.markmail.org/thread/qicpzm5ltnzfsd42
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)