Enhanced Retry Mechanism in HVAR and RTL

The enhanced retry mechanism improves replication performance for high-volume adaptive replication (HVAR) and real-time loading (RTL).

HVAR and RTL try to group as many compilable transactions as possible together, compile the transactions in the group into a net change, and then use the bulk interface in the replicate database to apply the net changes to the replicate database. HVAR and RTL invoke the retry mechanism when a replicate transaction resulting from HVAR and RTL processing fails. If transactions in a group fail, RTL and HVAR split the group into two smaller groups of equal size, and retry the compilation and bulk application on each group. The retry mechanism identifies the failed transaction, allows Replication Server to execute error action mapping, and applies all transactions preceding the failed transaction in case DSI shuts down.

The net-change database in HVAR and RTL acts as an in-memory repository for storing the net row changes of a transaction, that is, the compiled transaction. The content of the net-change database is an aggregation of commands from different primary transactions that HVAR and RTL are not applying in log order. Therefore, there is no means to identify a failed transaction without a retry mechanism. The retry mechanism splits a group and retries compilation and bulk application continuously as long as a transaction in the group fails. This continuous retry process can degrade performance.

The enhanced retry mechanism splits the group into three groups of equal size when HVAR or RTL encounter a group containing transactions that fail, enabling the mechanism to more efficiently identify the group containing the failed transaction.

In addition, with Replication Server 15.6, you can use the dsi_compile_retry_threshold parameter to specify a threshold value for the number of commands in a group. If the number of commands in a group containing failed transactions is smaller than the value of dsi_compile_retry_threshold, Replication Server does not retry processing the group, and saves processing time, thus improving performance. Instead, Replication Server switches to continuous replication mode for the group. Continuous replication mode sends each logged change to the replicate database according to the primary database log order.

Use configure replication server to set dsi_compile_retry_threshold at the server level to affect all replicate database connections, or use alter connection to set dsi_compile_retry_threshold for a connection to a database and data server that you specify.

Note: You must enable RTL or HVAR with dsi_compile_enable to use dsi_compile_retry_threshold. You must execute a separate configure replication server or alter connection command for each parameter you want to change. Do not enter more than one parameter after entering configure replication server or alter connection.

Valid values for dsi_compile_retry_threshold are integers between 0 – 2,147,483,647. The default value is 100.

You need not suspend and resume database connections when you set dsi_compile_retry_threshold. The parameter takes effect immediately after you execute the command.

Related concepts
RTL Configuration