c-treeACE quiesce feature now supports an option to wait for all replication readers that have registered with the server to finish processing all committed transactions. This allows a known clean replication state to be established during a critical quiesce phase.
Enhancement to the ctquiet Utility
A new option has been added to the ctquiet utility to enable this state. Use the -c option to wait for replication readers to signal their completion. The -c option requires the -f (full consistency) option. Example:
ctquiet -c –f –p ADMIN –s FAIRCOMS
Note: The -c option requires ALL new client utilities, replication readers, and servers to be installed from c-treeACE V11.3 or later. It is not compatible as a drop-in to current running environments.
Monitoring ctQUIET() Progress
The server logs messages to CTSTATUS.FCS indicating its progress in waiting for replication readers to signal their completion:
Wed Mar 8 14:42:31 2017
- User# 00019 ctQUIET: Waiting for replication readers to signal completion.
Wed Mar 8 14:42:31 2017
- User# 00019 ctQUIET: Replication reader AGENT1 has signaled completion.
Wed Mar 8 14:42:31 2017
- User# 00019 ctQUIET: All replication readers have signaled completion.
Note: If a replication reader does not have the support for responding to a ctQUIET() operation, the ctQUIET() call fails and the server logs this message to CTSTATUS.FCS:
Wed Mar 8 15:59:40 2017
- User# 00018 ctQUIET: Replication reader AGENT1 does not support notification of a ctQUIET() operation.
New ctQUIET API Options
For more detailed control, the ctQUIET() API supports several new options to allow replication readers to complete. To enable this support, OR in the ctQTwaitForReplReaders option bit into the mode value passed to ctQUIET(). If a replication reader is not connected to the server, or if it is connected but has not set its log position, ctQUIET() will wait for that replication reader to connect and process all committed transactions, unless the ctQTignoreInactiveReplReaders option is also specified, in which case ctQUIET() will ignore such inactive replication readers.
The ctQUIET() timeoutSEC option can be used to set a time limit on how long ctQUIET() waits for replication readers. The timeoutSEC value is also used as the time period for waiting for active transactions to finish. The amount of the timeoutSEC time that remains after active transactions have finished is applied to the wait for replication readers. For example, if timeoutSEC is 60 and active transactions take 40 seconds to finish, then ctQUIET() will wait for up to 20 seconds for replication readers to signal that they have processed all committed transactions.