What is restartGroup and updateGroup?

What is “restartGroup” and “updateGroup” used for?

To control the order in which MDEX restart and applied partial updates, Deployment Template has two properties associated with the MDEX components. The restartGroup property applies to restarting MDEX Engine, while the updateGroup property applies to updating MDEX Engine. Below is the example on how to configure these groups.

When restartGroup property is set, odd number dgraphs will  restart first “DemoDgraph1” and “DemoDgraph3” at the same time (restartGroup “A”), and then even number dgraphs will  restart “DemoDgraph2” and “DemoDgraph4” at the same time (restartGroup “B”).

When updateGroup property is set, it will apply partials to “DemoDgraph1” and “DemoDgraph4” simultaneously (updateGroup “a”), then to “DemoDgraph2” and “DemoDgraph3” simultaneously (updateGroup “b’).

<dgraph id="DemoDgraph1" host-id="DemoMDEXHost1" port="11000">
  <properties>
    <property name="restartGroup" value="A" />
    <property name="updateGroup" value="a" />
  </properties>
  <log-dir>./logs/dgraphs/DemoDgraph1</log-dir>
  <input-dir>./data/dgraphs/DemoDgraph1/dgraph_input</input-dir>
  <update-dir>./data/dgraphs/DemoDgraph1/dgraph_input/updates</update-dir>
</dgraph>

<dgraph id="DemoDgraph2" host-id="DemoMDEXHost1" port="11001">
  <properties>
    <property name="restartGroup" value="B" />
    <property name="updateGroup" value="b" />
  </properties>
  <log-dir>./logs/dgraphs/DemoDgraph2</log-dir>
  <input-dir>./data/dgraphs/DemoDgraph2/dgraph_input</input-dir>
  <update-dir>./data/dgraphs/DemoDgraph2/dgraph_input/updates</update-dir>
</dgraph>

<dgraph id="DemoDgraph3" host-id="MDEXHost2" port="11000">
  <properties>
    <property name="restartGroup" value="A" />
    <property name="updateGroup" value="b" />
  </properties>
  <log-dir>./logs/dgraphs/DemoDgraph3</log-dir>
  <input-dir>./data/dgraphs/DemoDgraph3/dgraph_input</input-dir>
  <update-dir>./data/dgraphs/DemoDgraph3/dgraph_input/updates</update-dir>
</dgraph>

<dgraph id="DemoDgraph4" host-id="MDEXHost2" port="11001">
  <properties>
    <property name="restartGroup" value="B" />
    <property name="updateGroup" value="a" />
  </properties>
  <log-dir>./logs/dgraphs/DemoDgraph4</log-dir>
  <input-dir>./data/dgraphs/DemoDgraph4/dgraph_input</input-dir>
  <update-dir>./data/dgraphs/DemoDgraph4/dgraph_input/updates</update-dir>
</dgraph>

All MDEX components with same restartGroup value will be restarted in parallel and all those with the same updateGroup value will have updates applied in parallel. Different groups will be handled sequentially, in alphabetical order.

Let's Share
Exit mobile version