You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Mete Atamel <ma...@adobe.com> on 2012/09/24 12:03:37 UTC

Mongo property limit

Hi,

I couldn't find official documentation on this but my tests revealed that
there's a limit to how long a property value can be in MongoDB and this
affects MongoMK. 

In MongoMK, we have a "path" property which stores the full path of a
node. Here's an example:

{
    "_id": {
        "$oid": "506027cc09d03cd0a04b1498"
    },
    "path": "/test0/test1/test2/test3/test4/test5/test6/test7/test8",
    "revId": 10,
    "baseRevId": 9,
    "kids": [
        "test9"
    ]
}


With the property length limit in Mongo, paths in MongoMK are limited to
1000 characters or so. This means that there's a limit to path
length/depth in MongoMK, see OAK-333.

How should we handle this? Shall we document this as a limitation of
MongoMK? Or shall we try to do something smarter like splitting the full
path into multiple smaller path properties?

Thanks,
Mete


Re: Mongo property limit

Posted by Mete Atamel <ma...@adobe.com>.
I think it might have to do with indexing. This suggests that there's a
800 byte limit on a field to be indexed and "path" is indexed:

http://stackoverflow.com/questions/10224128/is-there-a-limit-on-the-length-
of-id-in-mongodb

-Mete

On 9/24/12 1:58 PM, "Carsten Ziegeler" <cz...@apache.org> wrote:

>I haven't heard about such a limit yet, a document has currently a
>limit of 16mb - I also did a test with a property having 1500
>characters; and it worked
>
>Carsten
>
>2012/9/24 Julian Reschke <ju...@gmx.de>:
>> On 2012-09-24 12:03, Mete Atamel wrote:
>>>
>>> Hi,
>>>
>>> I couldn't find official documentation on this but my tests revealed
>>>that
>>> there's a limit to how long a property value can be in MongoDB and this
>>> affects MongoMK.
>>>
>>> In MongoMK, we have a "path" property which stores the full path of a
>>> node. Here's an example:
>>>
>>> {
>>>      "_id": {
>>>          "$oid": "506027cc09d03cd0a04b1498"
>>>      },
>>>      "path": "/test0/test1/test2/test3/test4/test5/test6/test7/test8",
>>>      "revId": 10,
>>>      "baseRevId": 9,
>>>      "kids": [
>>>          "test9"
>>>      ]
>>> }
>>>
>>>
>>> With the property length limit in Mongo, paths in MongoMK are limited
>>>to
>>> 1000 characters or so. This means that there's a limit to path
>>> length/depth in MongoMK, see OAK-333.
>>> ...
>>
>>
>> a) Is the limit on bytes or characters?
>>
>> b) Just clarifying: this applies to *any* property, right? I can imagine
>> that there are cases where there's longer plain text content in
>> properties...
>>
>> Best regards, Julian
>
>
>
>-- 
>Carsten Ziegeler
>cziegeler@apache.org


Re: Mongo property limit

Posted by Carsten Ziegeler <cz...@apache.org>.
I haven't heard about such a limit yet, a document has currently a
limit of 16mb - I also did a test with a property having 1500
characters; and it worked

Carsten

2012/9/24 Julian Reschke <ju...@gmx.de>:
> On 2012-09-24 12:03, Mete Atamel wrote:
>>
>> Hi,
>>
>> I couldn't find official documentation on this but my tests revealed that
>> there's a limit to how long a property value can be in MongoDB and this
>> affects MongoMK.
>>
>> In MongoMK, we have a "path" property which stores the full path of a
>> node. Here's an example:
>>
>> {
>>      "_id": {
>>          "$oid": "506027cc09d03cd0a04b1498"
>>      },
>>      "path": "/test0/test1/test2/test3/test4/test5/test6/test7/test8",
>>      "revId": 10,
>>      "baseRevId": 9,
>>      "kids": [
>>          "test9"
>>      ]
>> }
>>
>>
>> With the property length limit in Mongo, paths in MongoMK are limited to
>> 1000 characters or so. This means that there's a limit to path
>> length/depth in MongoMK, see OAK-333.
>> ...
>
>
> a) Is the limit on bytes or characters?
>
> b) Just clarifying: this applies to *any* property, right? I can imagine
> that there are cases where there's longer plain text content in
> properties...
>
> Best regards, Julian



-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Mongo property limit

Posted by Carsten Ziegeler <cz...@apache.org>.
And we should vote for:

https://jira.mongodb.org/browse/SERVER-3372

Carsten

2012/9/24 Julian Reschke <ju...@gmx.de>:
> On 2012-09-24 13:57, Mete Atamel wrote:
>>
>> I think it's a byte limit rather than char limit and yes, it applies to
>> all properties but the "path" property in MongoMK is the one that's mostly
>> affected (as "path" could get quite long depending on tree depth and node
>> names).
>> ...
>
>
> It it's bytes rather than characters we should keep in mind that the
> character encoding (I assume UTF-8) will need >= 2 characters for all
> non-ASCII characters.
>
> Best regards, Julian



-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Mongo property limit

Posted by Julian Reschke <ju...@gmx.de>.
On 2012-09-24 13:57, Mete Atamel wrote:
> I think it's a byte limit rather than char limit and yes, it applies to
> all properties but the "path" property in MongoMK is the one that's mostly
> affected (as "path" could get quite long depending on tree depth and node
> names).
> ...

It it's bytes rather than characters we should keep in mind that the 
character encoding (I assume UTF-8) will need >= 2 characters for all 
non-ASCII characters.

Best regards, Julian

Re: Mongo property limit

Posted by Mete Atamel <ma...@adobe.com>.
I think it's a byte limit rather than char limit and yes, it applies to
all properties but the "path" property in MongoMK is the one that's mostly
affected (as "path" could get quite long depending on tree depth and node
names).

-Mete

On 9/24/12 1:40 PM, "julian.reschke@gmx.de" <ju...@gmx.de> wrote:

>On 2012-09-24 12:03, Mete Atamel wrote:
>> Hi,
>>
>> I couldn't find official documentation on this but my tests revealed
>>that
>> there's a limit to how long a property value can be in MongoDB and this
>> affects MongoMK.
>>
>> In MongoMK, we have a "path" property which stores the full path of a
>> node. Here's an example:
>>
>> {
>>      "_id": {
>>          "$oid": "506027cc09d03cd0a04b1498"
>>      },
>>      "path": "/test0/test1/test2/test3/test4/test5/test6/test7/test8",
>>      "revId": 10,
>>      "baseRevId": 9,
>>      "kids": [
>>          "test9"
>>      ]
>> }
>>
>>
>> With the property length limit in Mongo, paths in MongoMK are limited to
>> 1000 characters or so. This means that there's a limit to path
>> length/depth in MongoMK, see OAK-333.
>> ...
>
>a) Is the limit on bytes or characters?
>
>b) Just clarifying: this applies to *any* property, right? I can imagine
>that there are cases where there's longer plain text content in
>properties...
>
>Best regards, Julian


Re: Mongo property limit

Posted by Julian Reschke <ju...@gmx.de>.
On 2012-09-24 12:03, Mete Atamel wrote:
> Hi,
>
> I couldn't find official documentation on this but my tests revealed that
> there's a limit to how long a property value can be in MongoDB and this
> affects MongoMK.
>
> In MongoMK, we have a "path" property which stores the full path of a
> node. Here's an example:
>
> {
>      "_id": {
>          "$oid": "506027cc09d03cd0a04b1498"
>      },
>      "path": "/test0/test1/test2/test3/test4/test5/test6/test7/test8",
>      "revId": 10,
>      "baseRevId": 9,
>      "kids": [
>          "test9"
>      ]
> }
>
>
> With the property length limit in Mongo, paths in MongoMK are limited to
> 1000 characters or so. This means that there's a limit to path
> length/depth in MongoMK, see OAK-333.
> ...

a) Is the limit on bytes or characters?

b) Just clarifying: this applies to *any* property, right? I can imagine 
that there are cases where there's longer plain text content in 
properties...

Best regards, Julian

Re: Mongo property limit

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Mon, Sep 24, 2012 at 12:03 PM, Mete Atamel <ma...@adobe.com> wrote:
> How should we handle this? Shall we document this as a limitation of
> MongoMK? Or shall we try to do something smarter like splitting the full
> path into multiple smaller path properties?

I'd be fine with a documented limitation at least for now. If it ever
becomes a problem in practice, we can look at such smarter solutions
as long as they won't require significant changes to the MicroKernel
interface.

BR,

Jukka Zitting

Re: Mongo property limit

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

That's bad...

Artificial limits like these bite you sooner or later...

Remember the 256 characters (or bytes?) length limit of Windows paths. PITA

So, I would try to find a solution

Regards
Felix

Am 24.09.2012 um 12:03 schrieb Mete Atamel:

> Hi,
> 
> I couldn't find official documentation on this but my tests revealed that
> there's a limit to how long a property value can be in MongoDB and this
> affects MongoMK. 
> 
> In MongoMK, we have a "path" property which stores the full path of a
> node. Here's an example:
> 
> {
>    "_id": {
>        "$oid": "506027cc09d03cd0a04b1498"
>    },
>    "path": "/test0/test1/test2/test3/test4/test5/test6/test7/test8",
>    "revId": 10,
>    "baseRevId": 9,
>    "kids": [
>        "test9"
>    ]
> }
> 
> 
> With the property length limit in Mongo, paths in MongoMK are limited to
> 1000 characters or so. This means that there's a limit to path
> length/depth in MongoMK, see OAK-333.
> 
> How should we handle this? Shall we document this as a limitation of
> MongoMK? Or shall we try to do something smarter like splitting the full
> path into multiple smaller path properties?
> 
> Thanks,
> Mete
>