Loading TOC...

MarkLogic Server 11.0 Product Documentation
admin:database-foreign-replica-set-queue-size

admin:database-foreign-replica-set-queue-size(
   $foreign-replica as element(db:foreign-replica),
   $value as xs:unsignedInt
) as element(db:foreign-replica)

Summary

This function sets the queue size for the number of fragments or frames in-flight during database replication.

Parameters
foreign-replica The element returned by the admin:forest-foreign-replica or admin:forest-get-foreign-replicas function that specifies the configuration for the replica forest.
value The number of fragments or frames in the queue. During bulk replication, this number would be the number of fragments whose replication is in-flight. For instance, the server will send 10 fragments and wait for the first one to be acknowledged before sending the 11th fragment.

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}

Usage Notes

During normal operation, this queue size applies to journal frames rather than fragments. The server will stop sending new frames once it has 10 unacknowledged frames. It will stop sending frames until it gets an acknowledgement for the oldest one.

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 $freplica := admin:database-get-foreign-replicas($cfg, xdmp:database("MyReplica"))
    return
    admin:database-foreign-replica-set-queue-size($freplica, 20)

  (: Sets the foreign replica queue size to 20 and returns the new configuration
  element -- use admin:save-configuration to save the changes to the configuration
  or pass the configuration to other Admin API functions to make other changes.  :)


    

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