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.31. trepctl wait Command Options
|Specify the sequence number to be waited for |
|Specify the number of seconds to wait for the operation to complete |
|Specify a state to be waited for |
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.
To wait a specific sequence number to be applied:
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 master to be applied on the slave. 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
If the optional
is used, then trepctl waits for the specified number
of seconds for the request event to occur. For example, to wait for 10
seconds for the replicator to go online:
trepctl wait -state ONLINE -limit 10
Wait 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.