Versions Compared

Key

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

...

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.

 

Example:

No Format
bgColorCCC
dbvrep> SET_CONFLICT_HANDLERS FOR DEFAULT FOR UPDATE ON NO_DATA TO OVERWRITE

This sets the default conflict handler for updates to overwrite.

...

Note
  1. When the default global handlers are updated, this will only apply APPLY to newly prepared tables. Tables that have already been prepared (or replicated) will still use the previous defined default global handler. 
  2. We recommend to not set nontrivial default conflict handlers for the ERROR handlers. The reason is that if you get 0/many rows affected, the DATA handlers like OVERWRITE, NEWER, OLDER are a good way how to handle the conflict. If they fail, they fall through to the ERROR handler. If the ERROR handler is set to OVERWRITE, NEWER, OLDER, then the ERROR handler could loop forever. 
  3. The default handlers are also used if the conflict is "global", i.e. it's not for a particular table. The most prominent example is a conflict for a commit (e.g. a failed deferred constraint).