The trepctl wait command waits for the replicator to enter a specific state, or for a specific sequence number to be applied to the dataserver.
trepctl wait [
-applied seqno ] [
-limit s ] [
-state st ]
Table 9.51. trepctl wait Command Options
The command will wait for the specified occurrence, of either a change
in the replicator status (i.e.
ONLINE), or for a specific
sequence number to be applied. For example, to wait for the replicator
to go into the
trepctl wait -state ONLINE
This can be useful in scripts when the state maybe changed (for example during a backup or restore operation), allowing for an operation to take place once the requested state has been reached. Once reached, trepctl returns with exit status 0.
trepctl wait -applied 2000
This can be useful when performing bulk loads where the sequence number where the bulk load completed is known, or when waiting for a specific sequence number from the Primary to be applied on the Replica. Unlike the offline-deferred operation, no change in the replicator is made. Instead, trepctl simply returns with exit status 0 when the sequence number has bee successfully applied.
trepctl wait -state ONLINE -limit 10Wait timed out!
If the requested event does not take place before the specified time limit expires, then trepctl returns with the message 'Wait timed out!', and an exit status of 1.