Bidirectional Snapshot Replicaton Setup
RE-SD-2 Publishing a DAV collection
Defining conflict resolvers
Preliminaries
Every DAV collection on publisher can have a number of conflict resolvers which are used for conflict resolution. Each conflict resolver has an integer number (order) associated with it. Conflict resolvers are applied in ascending order.
Conflict resolver is a Virtuoso/PL procedure which receives conflicting DAV resource. DAV conflict resolver signatures are described in Virtuoso documentation. Conflict resolver can modify the resource which is passed in as 'inout' arguments. Conflict resolver should return an integer value which will be used for conflict resolution. Possible return values and their meaning are described in Virtuoso documentation.
There is a possibility to automatically generate some types of conflict resolvers. Automatically generated conflict resolver classes are:
- max_mtime - resource with maximum modification time wins
- min_mtime - resource with minumum modification time wins
- max_ctime - resource with maximum creation time wins
- min_ctime - resource with minumum creation time wins
- backup - backup of resource that lost conflict resolution will be performed, conflict resolution will continue
- notify - owner of resource will be notified if his resource lost conflict resolution
- pub_wins - publisher always wins
- sub_wins - subscriber always wins
Example defining a conflict resolver
- Login to the Conductor UI using the dba account.
- Go to the "Replication" tab and then go to the "Bidirectional Snapshot" tab.
- Click "Conflict Resolvers" for desired published DAV collection ("/DAV/doc").
- Press "New Resolver" button.
- Enter conflict resolver name suffix (enter "max_mtime"), select conflict resolver class (select "max_mtime"). You can optionally specify conflict resolver order (default is 100).
- Press "Add" button. A conflict resolver will be added. You can view and edit conflict resolver code by selecting the link with its name from the list of conflict resolvers.
Equivalent SQL commands to above
- Connect to the Virtuoso server via ISQL utility as DBA user.
- Create a conflict resolver for collection "/DAV/doc"
that will choose a resource with maximum modification time
(more recent resource).
SQL> REPL_ADD_DAV_CR ('/DAV/doc', 'max_mtime', 100, 'max_mtime');
| View the source | Action |
|---|---|
| 1. re_sd_2.sql | Set the initial state |
OpenLink Home
Technical Support