Loading TOC...

MarkLogic 9 Product Documentation
admin.databaseForeignReplicaSetQueueSize

admin.databaseForeignReplicaSetQueueSize(
   foreign-replica as element(db.foreignReplica),
   value as Number
) as element(db.foreignReplica)

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

const admin = require('/MarkLogic/admin.xqy');
    var cfg = admin.getConfiguration()
    var freplica = admin.databaseGetForeignReplicas(cfg, xdmp.database("MyReplica"))
      admin.databaseForeignReplicaSetQueueSize(freplica, 20)

   //Sets the foreign replica queue size to 20 and returns the new configuration
//element -- use admin.saveConfiguration 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.