roxy
roxy copied to clipboard
Forests with Replicas are not deleted by wipe
I used the configuration suggested in #408 to create forest replicas when bootstrapping MarkLogic. The ml local wipe
command does not delete the forests.
<configuration>
<assignments xmlns="http://marklogic.com/xdmp/assignments" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/assignments assignments.xsd">
<assignment>
<forest-name>@ml.content-db-rep1</forest-name>
@ml.forest-data-dir-xml
</assignment>
<assignment>
<forest-name>@ml.content-db-rep2</forest-name>
@ml.forest-data-dir-xml
</assignment>
<assignment>
<forest-name>@ml.content-db</forest-name>
<replica-names>
<replica-name>@ml.content-db-rep1</replica-name>
<replica-name>@ml.content-db-rep2</replica-name>
</replica-names>@ml.forest-data-dir-xml</assignment>
</assignments>
<databases xmlns="http://marklogic.com/xdmp/database" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/database database.xsd">
<database>
<database-name>@ml.content-db</database-name>
<forests>
<forest-id>@ml.content-db</forest-id>
</forests>
</database>
</databases>
</configuration>
After ml local bootstrap
: Database and Forests
After ml local wipe
: Database was deleted but Forests were not
This is on an ml-vagrant generated Linux cluster, using MarkLogic 8.0-6 and the April-2017-dev version of Roxy.
Im curious, are they deleted if you perform a second wipe after the first one? Which version of Roxy and MarkLogic are you using? Thanks for the details, I will try to reproduce this soon.
I tried this, but unfortunately they aren't deleted after a second wipe. I'm using MarkLogic 8.0-6 and the April-2017-dev version of Roxy
I'm not sure where this would be done in the Roxy code, but I believe that forests need to be "disconnected" from their replicas before deleting either. Perhaps that's the issue? For example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $forest := xdmp:forest("forest-1")
let $replica-forest := xdmp:forest("forest-1r")
let $new-config := admin:forest-remove-replica($config, $forest, $replica-forest)
return admin:save-configuration($new-config)
Any luck replicating this? Thanks!
I haven't seen any movement on this - so I'll add it into some of the other work I'm doing for replicas.