getAsyncReplicationTasks

Syntax

getAsyncReplicationTasks([n])

Arguments

n is an optional parameter indicating the number of tasks to be retrieved from the path specified by asyncReplicationWorkDir. If n is not specified, retrieve all tasks.

Details

After enabling the cross-cluster asynchronous replication mode, execute this function on a data node of the master cluster to retrieve tasks pending sending from the path specified by asyncReplicationWorkDir. Before you call this function, please make sure the asynchronous replication mode is in “stop” status.

Return a table with the following columns:

  • Skip: A BOOLEAN value indicating whether this task is has a “skip“ flag. True means to skip.

  • Cid: The commit ID of the associated transaction.

  • Function: The associated function or command of the task.

  • Args: The number of parameters in the associated function or command.

Examples

$ getAsyncReplicationTasks();

Skip

Cid

Function

Args

false

5

dropTable(database(‘dfs://test_copy’),’pt1’)

0

true

6

append!{database(‘dfs://test_copy’),’pt2’)}

1