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

Fixed #383, #380, #379, #378 #384

Merged
merged 1 commit into from
Apr 29, 2015

Conversation

grtjn
Copy link
Contributor

@grtjn grtjn commented Feb 20, 2015

@grtjn grtjn mentioned this pull request Feb 24, 2015
@grtjn
Copy link
Contributor Author

grtjn commented Mar 24, 2015

Sorry for piling up changes for 4 tickets, but they were very closely related. I can provide a sample ml-config to test this..

@grtjn grtjn mentioned this pull request Mar 26, 2015
@rlouapre
Copy link
Contributor

+1
Any idea when this PR will be merged

@grtjn
Copy link
Contributor Author

grtjn commented Mar 26, 2015

@rlouapre You can pull this locally using upgrade: ml upgrade --fork=grtjn --branch=forest-rep-improvements

@dmcassel
Copy link
Collaborator

@rlouapre, it hasn't been merged because neither @paxtonhare nor I have had a chance to test it. Have you tried out these changes?

@grtjn
Copy link
Contributor Author

grtjn commented Apr 14, 2015

You can relatively easy test this and #366 as well by following these steps:

  • create a cluster of at least 2 nodes, you can use mlvagrant for this
  • create a roxy or slush project, and configure it to point to the cluster
  • run: ./ml upgrade --fork=grtjn --branch=366-replicate-internals
  • edit ml-config.xml, and change the assignments section into:
  <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</forest-name>
      <replica-names>
        <replica-name>@ml.content-db-rep1</replica-name>
      </replica-names>
      @ml.forest-data-dir-xml
    </assignment>
    <assignment>
      <forest-name>@ml.content-db-rep1</forest-name>
      @ml.forest-data-dir-xml
    </assignment>
    @ml.test-content-db-assignment
    @ml.test-modules-db-assignment
    @ml.rest-modules-db-assignment
    <assignment>
      <forest-name>@ml.modules-db</forest-name>
      <replica-names>
        <replica-name>@ml.modules-db-rep1</replica-name>
      </replica-names>
    </assignment>
    <assignment>
      <forest-name>@ml.modules-db-rep1</forest-name>
    </assignment>
    @ml.schemas-assignment
    @ml.triggers-assignment
  </assignments>
  • run: ./ml local bootstrap
  • run: ./ml local bootstrap --replicate-internals

The end result should be that all forests have a local replica failover.

paxtonhare added a commit that referenced this pull request Apr 29, 2015
@paxtonhare paxtonhare merged commit a63db66 into marklogic-community:dev Apr 29, 2015
@rlouapre
Copy link
Contributor

Just see this PR has been merged.

Tested it successfully on a simple 3 nodes cluster.

A couple of questions:

  • I need to create a replica-name for each node of the cluster. Would it be possible to discover all nodes of the cluster and create replica forest on each node except the current node?
<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>
  • I assume Roxy deployment script will not changed existing forests setup. Would it be possible to change this behavior so that Roxy script managed the replica forest settings? Scenario: new nodes are added to the cluster re-run bootstrap will create forest and replicas on new nodes.

@grtjn
Copy link
Contributor Author

grtjn commented Apr 30, 2015

@rlouapre Keep in mind that for databases with a forests-per-host setting, a forest is created on each host of the target group, and for each forest a replica would be created. It doesn't make sense to create n replicas for each forest. That would completely kill the performance of the cluster. Each replica adds 100% IO for that forest.

Yes, Roxy bootstrap is designed to keep things in place as much as possible, and only add changes. If you started with 3 nodes, did a bootstrap, and then add node 4, you can rerun bootstrap to add more forests. I haven't tried how well that works with replica forests. Rep forests might get redistributed, not sure how well that works..

If this still leaves questions or issues, maybe open new tickets..

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

Successfully merging this pull request may close these issues.

None yet

4 participants