Parallel DSI processing must duplicate the commit order of transactions at the primary database, yet allow transaction updates to process simultaneously. It must then resolve any transaction contentions that occur as a result.
Commit order deadlock transaction contentions—or contention deadlocks—can occur when a transaction cannot commit because it must wait for an earlier transaction to commit, and the earlier transaction cannot commit because needed resources are locked by the later transaction.
For example, DSI threads A and B are processing transactions in parallel. Thread A’s transaction must commit before thread B’s transaction. Thread B’s transaction locks resources needed by thread A. Thread B’s transaction cannot commit until thread A’s transaction commits, and thread A’s transaction cannot commit because needed resources are locked by thread B.
The internal method is handled primarily within SAP Replication Server, and uses the rs_dsi_check_thread_lock function string for commit order deadlock detection. The external method requires both SAP Replication Server and the replicate database, and uses the rs_threads system table for both commit order validation and commit order deadlock detection.
SAP recommends the internal method, which is the default, for both SAP and non-SAP data servers. This method requires less network I/O than the external method, and, if a commit order deadlock occurs, may require the rollback of only a single transaction. The external method requires more network I/O and results in the rollback of several transactions. The external method is included for compatibility with earlier versions of SAP Replication Server.
If SAP Replication Server encounters commit order deadlock and dsi_commit_control is on, SAP Replication Server rolls back and retries one transaction. If, however, SAP Replication Server encounters commit order deadlock and dsi_commit_control is off, SAP Replication Server rolls back and retries all transactions serially.
alter connection to TOKYO_DS.pubs2 set dsi_commit_control to ‘on’
Setting dsi_commit_control to “on” specifies the internal method; setting dsi_commit_control to “off” specifies the external method.