Which node in a MarkLogic cluster runs the CPF Action Module?

假如想象 提交于 2019-12-24 02:58:09

问题


I have a MArkLogic cluster with 3 nodes:

  1. Node 1
  2. Node 2
  3. Node 3

On this clustered environemnt I have a database test which has one forest test-01. The Primary Host for the forest test-01 is on Node 1. Also, I have CPF installed on the database test

Now, when I insert any document in the database test, the CPF action module will be executed on which Node's Task Server thread?

Will the Primary Host of the forest in which the document gets created ALWAYS executes the CPF action module?

What If I configure a failover replica of forest test-01 on Node 2 and Node 3 and after that stop the MarkLogic service on Node 01. which Node's Task Server will then execute the CPF action modules?


回答1:


CPF uses triggers. A pre-commit trigger will fire on the same host that processes the update. This is independent of forest and cluster configuration. A post-commit trigger will run on the Task Server on the host with the affected forest (thanks to John Snelson for correcting my understanding on this point).

CPF actions use both kinds of triggers. So if you want to limit triggers to a single host, ensure that all your updates are processed on that host and ensure all the affected forests are on that same host. You'd also want to handle host failover by moving update traffic to the next host.

CPF also uses the database online event, which is a little different. I believe that can run on any host, but it may be limited to hosts with any forests attached to the database.



来源:https://stackoverflow.com/questions/27106378/which-node-in-a-marklogic-cluster-runs-the-cpf-action-module

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!