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

Forest replica setup #408

Closed
rlouapre opened this issue Mar 25, 2015 · 5 comments
Closed

Forest replica setup #408

rlouapre opened this issue Mar 25, 2015 · 5 comments
Labels

Comments

@rlouapre
Copy link
Contributor

Using ml 1.7.2-dev.
Looking for ml-config.xml sample to setup forest replica for cluster 3 hosts, 2 forest per host

Properties defined:
forest-data-dir=/forest-data
content-forests-per-host=2

In ml-config.xml:

    <assignment>
      <forest-name>@ml.content-db</forest-name>
      <replica-names>
        <replica-name>@ml.content-db</replica-name>
      </replica-names>
      @ml.forest-data-dir-xml
    </assignment>

According to this comment replica name should point to forest name.
#361 (comment)

@grtjn
Copy link
Contributor

grtjn commented Mar 25, 2015

You need to declare an extra forest, and refer to that. E.g <replica-name>@ml.content-db-rep</..>,  and then an extra <assignment> section for that..

@rlouapre
Copy link
Contributor Author

Got it working with one replica - Thanks @grtjn

But I need to create 2 replica forests (one on each other node)
forest#1 on host#1 should have 2 replica forests - forest#1-r1 on host#2 and forest#2-r2 on host#3).

This configuration creates 2 replica forests but on the same host.

Also I am using the same ml-config.xml on several environments in dev I don't really need to create forest replica (not a cluster). Any suggestion to use the same ml-config.xml but generate replica forest only on clustered environment?

  <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>

@grtjn
Copy link
Contributor

grtjn commented Mar 26, 2015

See PR #384, that contains everything you are looking for.. :)

@grtjn
Copy link
Contributor

grtjn commented Apr 30, 2015

I think we can close this one. Agree?

@joeglorioso
Copy link

I realize that this is an older thread. Did you run into any problems wiping your database using this configuration? I'm seeing the following using the latest dev branch:

$ ml local wipe
Wiping MarkLogic setup for your project from test-ml1...
ERROR: ADMIN-DELETEREPLICATOO: (err:FOER0000) Cannot delete forest 7941463876271596649 unless replica forest 17834384912436287805 is detached or also deleted
See MarkLogic Server error log for more details.
ERROR: ... Wipe FAILED
ERROR: exit
ERROR: ["deploy/lib/ml.rb:170:in exit'", "deploy/lib/ml.rb:170:in

'"]

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

No branches or pull requests

4 participants