admin:database-foreign-replica-set-lag-limit( $foreign-replica as element(db:foreign-replica), $lag-limit as xs:unsignedInt ) as element(db:foreign-replica)
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}
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. :)