Loading TOC...

MarkLogic 12 EA 1 Product Documentation
admin.databaseForeignReplicaSetLagLimit

admin.databaseForeignReplicaSetLagLimit(
   foreign-replica as element(db.foreignReplica),
   lag-limit as Number
) as element(db.foreignReplica)

Summary

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.

Required Privileges

This operation requires at least one of the following privileges:

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}

Example

  
  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 iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.