admin.databaseForeignReplicaSetLagLimit( foreign-replica as element(db.foreignReplica), lag-limit as Number ) as element(db.foreignReplica)
This function sets the lag limit value on a replica database configuration.
Parameters | |
---|---|
foreign-replica | The configuration element for the foreign replica database. |
lag-limit | The lag limit. |
http://marklogic.com/xdmp/privileges/admin/database
http://marklogic.com/xdmp/privileges/admin/database/{id}
http://marklogic.com/xdmp/privileges/admin/database/replication
http://marklogic.com/xdmp/privileges/admin/database/replication/{id}
const admin = require('/MarkLogic/admin.xqy'); const cfg = admin.getConfiguration() const old = admin.databaseGetForeignReplicas(cfg, xdmp.database("Documents")) const new = admin.databaseForeignReplicaSetLagLimit(freplica,30) const newcfg = admin.databaseSetForeignReplicas(cfg, xdmp.database("Documents"), new) admin.saveConfiguration(newcfg) //Sets the lag limit setting for the foreign replica database //configuration element.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.