In a heterogeneous replication environment, parallel DSI must ensure that the commit order in the replicate database is same as in the primary database. DSI can then resolve deadlock conflict, when deadlock has occurred, and Replication Server can rollback transactions and execute again.
Replication Server can maintain the order in which transactions are committed and detect conflicting updates in transactions that are simultaneously executing in parallel either:
Internally, using Replication Server internal tables and function strings, or,
Externally, using the rs_threads system table in the replicate database.
For external commit control, you must follow these rules:
When different sessions operate on the same row, the update operation in session 1 should block the select operation in session 2.
When different sessions operate on different rows, the update operation in session 1 should not block update in session 2.
Internal commit control method is better than external commit control because it depends on fewer conditions. If a deadlock occurs, the internal commit control allows Replication Server to roll back a single transaction, whereas external commit control rolls back all transactions.
Replication Server provides other options for maximizing parallelism and minimizing contention between transactions. For example, transaction serialization methods allow you to choose the degree of parallelism your system can handle without conflicts.
For detailed information on how to use parallel DSI threads, see Chapter 4, “Performance Tuning,” in the Replication Server 15.5 Administration Guide - Volume 2.