MarkLogic 10 Product Documentation
flexrep:configuration-target-set-immediate-push

flexrep:configuration-target-set-immediate-push(
   $cfg as element(flexrep:configuration),
   $target-id as xs:unsignedLong,
   $immediate-push as xs:boolean
) as element(flexrep:configuration)

Summary

Set a target's "immediate push" flag. This defaults to true when a target is created. Normally, when a document is created or updated, flexrep will attempt to replicate it to all push targets from a single CPF action, and a single database transaction. When many targets are configured, there is a danger that this transaction will run for a long time and eventually time out. The "immediate push" flag allows control over which targets should have documents replicated immediately, and which targets should have them replicated via the periodic retry scheduled task.

Query-based targets are always handled by the periodic retry scheduled task.

Parameters
cfg The replication configuration.
target-id The target ID.
immediate-push True if the target should attempt to push from the CPF action, false if it should only be pushed from the retry task.

Example


xquery version "1.0-ml"; 
 
import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" 
      at "/MarkLogic/flexrep.xqy";
 
flexrep:configuration-insert(
  flexrep:configuration-target-set-immediate-push(
    $cfg, $target-id, fn:false()))
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy