
flexrep.doPull( pull as element(flexrep.pull) ) as Sequence
This function is used by a Replica to pull updates from the Master. It returns a list of elements;
the first element is the response element that was set back to the master, followed by
one or more flexrep:ack elements that were posted back to the master.
| Parameters | |
|---|---|
| pull |
The pull replication configuration returned by the
flexrep:pull-get function.
|
const flexrep = require('/MarkLogic/flexrep');
const domain = xdmp.eval(
'const dom = require("/MarkLogic/cpf/domains");' +
'fn.data(dom.get("Default Master").xpath("//dom:domain-id"));',
null,
{
'database' : xdmp.database('Triggers')
});
const cfg = flexrep.configurationGet(domain, true);
const domainId = flexrep.configurationGetId(cfg);
const pull = flexrep.pullGet(domainId);
flexrep.doPull(pull);
// Returns the response and ACK elements last sent to the master.
http://marklogic.com/xdmp/privileges/flexrep-user
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.