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

Add support for generating mongo export command to oak-mongo

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.3.0, 1.4
    • run

    Description

      At time to analyse a issue with DocumentNodeStore running on Mongo we need a dump of various documents so as to recreate the scenario locally. In most case if issue is being observed for a specific path like /a/b then its sufficient to get Mongo documents for /, /a, /a/b and all the split documents for those paths.

      It would be useful to have a function in oak-mongo which generates the required export command. For e.g. for path like /a/b following export command would dump all required info

      mongoexport -h <mongo server> --port 27017 --db <db name> --collection nodes --out all-required-nodes.json --query '{$or:[{_id : /^4:p\/a\/b\//},{_id : /^3:p\/a\//},{_id : /^2:p\//},{_id:{$in:["2:/a/b","1:/a","0:/"]}}]}'
      

      Attachments

        1. createExportCommand.groovy
          1.0 kB
          Chetan Mehrotra
        2. ExportDetailedDoc.patch
          3 kB
          Vikas Saurabh
        3. ExportDetailedDoc-take2.patch
          3 kB
          Vikas Saurabh

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: