Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4567

Define oak:Resource nodetype as non referenceable alternative to nt:resource

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.6, 1.6.0
    • core

    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

        1. OAK-4567-v2.patch
          8 kB
          Angela Schreiber
        2. OAK-4567-v1.patch
          5 kB
          Chetan Mehrotra

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: