[
https://issues.apache.org/jira/browse/OAK-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14619976#comment-14619976
]
Vikas Saurabh commented on OAK-3087:
------------------------------------
bq. So the script would ensure that its run in dryMode first (as it does now).
But would not require the user to play with oak.indexCleanup. Instead the first
call itself would tell which indexes it would be removing
The reason I went for
{noformat}
> oak.indexCleanup.indexNames //print array
["some", "index", "names"]
> oak.indexCleanup.indexNames = ["some", "names"]
{noformat}
approach, because constructing JS array from dryMode output would require a bit
of scripting. Maybe, dryMode call without parameter would list generated array
as well. So, we'd have 3 mode of calls:
{noformat}
> oak.indexCleanup.cleanupIndices() //Generate list and execute in dryMode.
> Also, list the generated array
["some", "index", "names"]
....
> oak.indexCleanup.cleanupIndices(["some", "names"]) //Run dryMode for the
> given list
> oak.indexCleanup.cleanupIndices(["some", "names"], true) //carry out actual
> cleanup on the given list
{noformat}
> [oak-mongo.js] Add utility to cleanup hidden structure under disabled indices
> -----------------------------------------------------------------------------
>
> Key: OAK-3087
> URL: https://issues.apache.org/jira/browse/OAK-3087
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mongomk
> Reporter: Vikas Saurabh
> Priority: Minor
> Attachments:
> 0001-update-removeDescendantsAndSelf-for-upwards-removal.patch,
> 0002-OAK-3087-Add-some-methods-to-find-disabled-indices-a.patch
>
>
> While disabling property indices, avoids usage of those indices. But, they
> still maintain the data already stored under them. That data would keep on
> consuming storage space without serving any purpose. Also, it'd pile on
> mongo's id index.
> While one can delete index definition node to clear these nodes up -- but,
> it'd be really slow and a JCR based deleted would first create a HUGE commit
> while marking all documents under it as deleted. And, then the actual
> deletion would happen in next revision GC after 24 hours have past.
> Hence, it might be beneficial to have a low level api in oak-mongo.js, which
> simply removes the document from mongo altogether.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)