Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
In most cases where code uses JcrUtils.putFile [1] it leads to
creation of below content structure
+ foo.jpg (nt:file) + jcr:content (nt:resource) - jcr:data
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
Attachments
Attachments
Issue Links
- is related to
-
SLING-6090 Avoid using nt:resource while creating file nodes via SlingPostServlet
- Resolved
-
JCR-3998 New putFile method which uses non referenceable oak:Resource nodetype
- Closed