Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The response to a conflict can be configured before the conflict occurs. This is done with conflict handlers. The configuration can be specified for each replicated table and for each operation type separately, and for the special case ("data" divergence) mentioned above. The Dbvisit Replicate command to set conflict handlers is SET_CONFLICT_HANDLERS.

The options for conflict handles are as follows:

Operations"Data" handler"Error" handler
Updatediscard | retry | overwrite | pause | abort | newer | older | sql | plsql | errordiscard | retry | overwrite | pause | abort | plsql | error
Deletediscard | retry | overwrite | pause | abort | newer | older | sql | plsql | errordiscard | retry | overwrite | pause | abort | plsql | error
Insertn/adiscard | retry | overwrite | pause | abort | plsql | error
Transactionn/adiscard | retry | overwrite | pause | abort | plsql | error

...

  • log: the conflict is logged, and a error plog is created with the offending statement
  • nolog: the conflict is not logged
  • fast_nolog: the conflict is not logged and it may be omitted from conflict counters altogether
  • log_transaction: the conflict is logged, and a error plog is created with the offending transaction
  • default: same as log

See the Command Reference or use HELP SET_CONFLICT_HANDLERS for the exact syntax.
Use SHOW_CONFLICT_HANDLERS to query current settings of handlers.

Global default conflict handler

The default global setting for conflicts is "retry". This means that the operation will keep trying the operation until a manual change is made on the target to resolve the conflict. The default global setting for a conflict can be changed with the SET_CONFLICT_HANDLERS FOR DEFAULT command. See the Command Reference or use HELP SET_CONFLICT_HANDLERS for the exact syntax.