Loading TOC...

MarkLogic 12 EA 1 Product Documentation
admin:database-foreign-replica-set-lag-limit

admin:database-foreign-replica-set-lag-limit(
   $foreign-replica as element(db:foreign-replica),
   $lag-limit as xs:unsignedInt
) as element(db:foreign-replica)

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


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $old := admin:database-get-foreign-replicas($cfg, xdmp:database("Documents"))
  let $new := admin:database-foreign-replica-set-lag-limit($freplica,30)
  let $newcfg := admin:database-set-foreign-replicas($cfg, xdmp:database("Documents"), $new)
  return admin:save-configuration($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.