Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Forests with Replicas are not deleted by wipe #747

Open
joeglorioso opened this issue Feb 14, 2017 · 4 comments
Open

Forests with Replicas are not deleted by wipe #747

joeglorioso opened this issue Feb 14, 2017 · 4 comments

Comments

@joeglorioso
Copy link

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
screen shot 2017-02-14 at feb 14 2017 3 35 10 pm
screen shot 2017-02-14 at feb 14 2017 3 35 28 pm

After ml local wipe: Database was deleted but Forests were not
screen shot 2017-02-14 at feb 14 2017 3 36 01 pm

This is on an ml-vagrant generated Linux cluster, using MarkLogic 8.0-6 and the April-2017-dev version of Roxy.

@RobertSzkutak
Copy link
Contributor

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.

@joeglorioso
Copy link
Author

joeglorioso commented Feb 14, 2017

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)

@joeglorioso
Copy link
Author

Any luck replicating this? Thanks!

@jamsilvia
Copy link
Contributor

I haven't seen any movement on this - so I'll add it into some of the other work I'm doing for replicas.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants