Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-3311

No mechanism to transparently engage BTreeManager for flat repositories

    Details

      Description

      For someone to enjoy the benefits of the BTreeManager to map between an external, flat path and an internally-branching tree, he must use jackrabbit-specific classes to achieve it. This is is undesirable. It would be better if, through configuration, he could specify that his paths are likely flat and Jackrabbit would return implementations of the Node interface that would interact with the BTreeManager internally so that the application code could remain agnostic of the internal challenges of dealing with large numbers of child nodes.

      I've attached NodeWrapper.java which is a preliminary attempt at adapting the Node interface to the BTreeManager. In practice, however, I found that if the returned, wrapped Nodes were interrogated for their path, they would return the internal, rather than external, paths. Without an approach to address this problem, I abandoned testing.

      I would not have a problem with an assumption that the configuration option must be chosen at repository creation time and must not be changed thereafter.

      1. NodeWrapper.java
        21 kB
        David Hausladen

        Activity

        Hide
        Michael Dürig added a comment -

        Resolving won't fix as explained

        Show
        Michael Dürig added a comment - Resolving won't fix as explained
        Hide
        Michael Dürig added a comment -

        Not sure about the 2.13 part, however upgrading from Jackrabbit 2 to Oak is supported through the upgrade run mode of oak-run. See https://github.com/apache/jackrabbit-oak/blob/trunk/oak-run/README.md

        Show
        Michael Dürig added a comment - Not sure about the 2.13 part, however upgrading from Jackrabbit 2 to Oak is supported through the upgrade run mode of oak-run . See https://github.com/apache/jackrabbit-oak/blob/trunk/oak-run/README.md
        Hide
        Miroslav Nikolov added a comment -

        Michael, thanks for your advice.
        Do you think it will be possible to migrate from JackRabbit 2.13 to Oak?

        Show
        Miroslav Nikolov added a comment - Michael, thanks for your advice. Do you think it will be possible to migrate from JackRabbit 2.13 to Oak?
        Hide
        Michael Dürig added a comment -

        As Jackrabbit Oak has OOTB support for flat hierarchies now, this is not a priority any more and I suggest to resolve it as won't fix.

        Also the approach taken by the patch turns out to be problematic as wrapping nodes proliferates to nearly all other JCR classes, which in the end also will need wrapping.

        Show
        Michael Dürig added a comment - As Jackrabbit Oak has OOTB support for flat hierarchies now, this is not a priority any more and I suggest to resolve it as won't fix. Also the approach taken by the patch turns out to be problematic as wrapping nodes proliferates to nearly all other JCR classes, which in the end also will need wrapping.
        Hide
        Miroslav Nikolov added a comment -

        Is there any progress on this issue? Can I expect a patch in some of the next releases? As I see Jackrabbit-Oak is claiming to replace the current Jackrabbit, so probably this issue is not a priority?

        Show
        Miroslav Nikolov added a comment - Is there any progress on this issue? Can I expect a patch in some of the next releases? As I see Jackrabbit-Oak is claiming to replace the current Jackrabbit, so probably this issue is not a priority?
        Hide
        Michael Dürig added a comment -

        Thanks for the patch. This looks like a good start. I'll try to dig deeper as soon as time permits.

        Show
        Michael Dürig added a comment - Thanks for the patch. This looks like a good start. I'll try to dig deeper as soon as time permits.
        Hide
        David Hausladen added a comment -

        This is just a start. Developers using the Session interface to getNode(s) need similar support.

        Show
        David Hausladen added a comment - This is just a start. Developers using the Session interface to getNode(s) need similar support.

          People

          • Assignee:
            Michael Dürig
            Reporter:
            David Hausladen
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development