[ 
https://issues.apache.org/jira/browse/OAK-333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13526339#comment-13526339
 ] 

Thomas Mueller commented on OAK-333:
------------------------------------

> > replace multiples of limit/2 bytes in once step
> But that would result in similar limitations wrt. to sharding as you describe 
> above since a much longer path with the same prefix as a shorter path might 
> end up with a different replacement for its initial part.

Yes, there would be one replacement for paths with length 500-1000 bytes, and a 
different replacement for a path with length 1000-1500 bytes, and so on. That's 
true. However, it sounds to me this is just a theoretical problem, and not a 
real one. I'm not even sure that in reality we will encounter paths that are 
larger than 1000 bytes, let alone path longer than 2000 bytes.

> The hash based approach avoids that.

Yes, it avoid that, but with the cost of a different (and I believe much 
bigger) problem, which is: you would need to read each node separately once the 
path exceeds a certain limit. Plus nodes with a similar name would be stored in 
completely different place in the index (within the same mongo shard). This is 
a similar problem than what we have in Jackrabbit 2.x with the randomly 
distributed node ids.

                
> 1000 character path limit in MongoMK
> ------------------------------------
>
>                 Key: OAK-333
>                 URL: https://issues.apache.org/jira/browse/OAK-333
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mk, mongomk
>    Affects Versions: 0.5
>            Reporter: Mete Atamel
>            Assignee: Mete Atamel
>            Priority: Minor
>         Attachments: OAK-333.patch
>
>
> In an infinite loop try to add nodes one under another to have N0/N1/N2...NN. 
> At some point, the current parent node will not be found and the current 
> commit will fail. I think this happens when the path length exceeds 1000 
> characters. Is this enough for a path? I was able to create this way only 222 
> levels in the tree (and my node names were really short N1, N2 ...)
> There's an automated tests for this: NodeExistsCommandMongoTest.testTreeDepth

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to