Loading TOC...

flexrep:push-local-forest

flexrep:push-local-forest(
   $domain-id as xs:unsignedLong,
   $forest-id as xs:unsignedLong,
   $max-spawn as xs:unsignedLong
) as empty-sequence()

Summary

This function pushes pending replication updates (either retries or zero-day) for the specified forest on the current host. If any updates are found, a new task is spawned to call this function again. This continues until all pending replication updates have been processed.

Parameters
domain-id The ID of the replicated domain.
forest-id The ID of the replicated forest.
max-spawn The limit to the number of doable spawns. If a task respawns itself too many times, a spawn will eventually fail with an exception.

Example

  xquery version "1.0-ml"; 

  import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" 
      at "/MarkLogic/flexrep.xqy";

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

  let $forest-id :=  
      admin:forest-get-id(admin:get-configuration(), "MasterForest")

  return
      flexrep:push-local-forest(5864248273900832906, $forest-id)
 
  (: Pushes all pending replication updates from the "MasterForest" forest on the host. :)
        

Required Privileges

http://marklogic.com/xdmp/privileges/flexrep-user

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.