Issue 1120 in tungsten-replicator: provide some conflict resolution mechanisms for multi-master settings

43 views
Skip to first unread message

tungsten-...@googlecode.com

unread,
Aug 14, 2015, 8:45:52 PM8/14/15
to tungsten-repl...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Low Foundin

New issue 1120 by Dominiqu...@unige.ch: provide some conflict resolution
mechanisms for multi-master settings
https://code.google.com/p/tungsten-replicator/issues/detail?id=1120

1. To which tool/application/daemon will this feature apply?

replicator daemon (applier)

2. Describe the feature in general

The FAQ says that
"There is no built-in conflict resolution in Tungsten."
cf.
https://code.google.com/p/tungsten-replicator/wiki/FAQ#How_do_I_handle_conflicts_in_multiple_master_scenarios?

Change this and provide some mechanisms to handle conflict resolution for
simple database settings where it
is acceptable.

3. Describe the feature interface

A user settable property multi_master_conflict_resolution with one value
from a fixed list of methods, eg.
none, earliest_wins, latest_wins, ok_if_same, merge

4. Give an idea (if applicable) of a possible implementation

You certainly have plenty of examples and ideas yourselves
on how to implement some. Here is anyway some dabble at it:

latest_wins:

# in case of conflict:
if (repl_row.timestamp > db_row(repl_row.key).modify_timestamp)
then db_row(repl_row.key).data=repl_row.data
db_row(repl_row.key).modify_timestamp=repl_row.timestamp

Needs tombstone data for deleted rows.


ok_if_same:

if (repl_row.op==insert)
if (exists(db_row(repl_row.key).data)
then if (repl_row.data == db_row(repl_row.key).data)
then OK
else KO
else insert()
else if (repl_row.op==update)
then if (repl_row.data == db_row(repl_row.key).data)
then OK
else update()
else if (repl_row.op==delete)
then if ( exists(db_row(repl_row.key).data))
then if (repl_row.data == db_row(repl_row.key).data)
then delete()
else KO
else OK


5. Describe pros and cons of this feature.

5a. Why the world will be a better place with this feature.

Sites with a very simple database structure (e.g. one table with key-value)
will be able to
operate in a multi-master replication topology without
having to worry about failures due to basic replication conflicts.

5b. What hardship will the human race have to endure if this feature is
implemented.

If your database is not so simple or if order of modification
can lead to problems, and you set the wrong conflict resolution method then
your database will be corrupted.
But you have been warned!!



6. Notes

One could adapt the conflict resolution strategy
of multimaster redundant LDAP directories.



--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages