You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2017/06/06 05:17:18 UTC

[jira] [Commented] (OAK-6307) Function to find all large docs in Mongo

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

Chetan Mehrotra commented on OAK-6307:
--------------------------------------

added in 1797727

*Usage*
Change connection url accordingly
{noformat}
$ wget https://s.apache.org/oak-mongo.js 
$ mongo localhost:27017/oak --eval  "load('./oak-mongo.js');oak.dumpLargeDocIds();" > oak-mongo.log
{noformat}

Output
{noformat}
Traversed #10000
Traversed #20000
Traversed #30000
Traversed #40000
Traversed #50000
Traversed #60000
Traversed #70000
Traversed #80000
id|2:/content/test
Number of large documents : 1
Using following export command to tweak the output
mongoexport --host 127.0.0.1 --port 27017 --db gr-oak16 --collection nodes --out all-required-nodes.json --query '{"_id":{"$in":["2:/content/test"]}}'
{noformat}

The last line would have a mongoexport command generated which can then be executed to dump the details about large docs to a file

> Function to find all large docs in Mongo
> ----------------------------------------
>
>                 Key: OAK-6307
>                 URL: https://issues.apache.org/jira/browse/OAK-6307
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: run
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.8
>
>
> At times we are seeing issue where document start exceeding the Mongo size limit of 16MB. This mostly happens for node having orderable children like {{nt:unstructured}} and where number of child nodes become very large.
> We should add a function in oak-mongo.js which allows finding all such documents



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)