Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

Earliest and Latest Timestamp Update Conflict Resolution Methods

The earliest timestamp and latest timestamp methods are variations on the minimum and maximum value methods. For the timestamp method, the designated column must be of type DATE. Whenever any column in a column group is updated, your application should update the value of this timestamp column with the local SYSDATE. For a change applied from another site, the timestamp value should be set to the timestamp value from the originating site.

Consider this sequence of events:

Note: If your replicated environment crosses time zones, your application should convert all timestamps to a common time zone. Otherwise, although your data will converge, you may not apply the most recent update.

Oracle does not enforce time synchronization, which should be provided by another mechanism.

Note: A sample timestamp and site site maintenance trigger is shown in the Example section (see [*]).

The earliest timestamp method applies the changes from the site with the earliest timestamp, and the latest timestamp method applies the changes from the site with the latest timestamp.

Suggestion: Designate a backup method, such as site priority, to be called if two sites have the same timestamp. Standardize your timestamping mechanism; for example, you can convert the timestamp to a designated time zone, such as Greenwich Mean Time (GMT).

A clock counts seconds as an increasing value. Assuming that you have properly designed your timestamping mechanism and established a backup method in case two sites have the same timestamp, the latest timestamp method (like the maximum value method) guarantees convergence. The earliest timestamp method, however, cannot guarantee convergence for more than two masters.


Contents Index Home Previous Next