×

System, method, and computer program product for multi-master replication conflict resolution

  • US 7,509,354 B2
  • Filed: 01/07/2005
  • Issued: 03/24/2009
  • Est. Priority Date: 01/07/2005
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method of resolving a conflict when performing data replication in a multi-mastered system, the method comprising the computer implemented steps of:

  • receiving, by a first data processing system, a replication command generated by a second data processing system;

    identifying the conflict between a first entry managed by the first data processing system and a second entry managed by the second data processing system, wherein the conflict exists when a first update occurs to the first entry and a second update occurs to the second entry prior to the data replication in the multi-mastered system, wherein the replication command generated by the second data processing system includes the second update performed by the second data processing system on the second entry, a first timestamp read from the second entry prior to the second update and a second timestamp that identifies the time at which the second update was performed, wherein the step of identifying further includes;

    comparing the first timestamp with a third timestamp, wherein the third timestamp is read from the first entry and identifies the time at which the first update was performed to the first entry; and

    determining that the first timestamp and the third timestamp are unequal;

    responsive to identifying the conflict, determining a one of the first entry and the second entry that is a most recently modified entry using the first timestamp, the second timestamp and the third time-stamp, wherein the one of the first entry and the second entry not identified as the most recently modified entry is a least recently modified entry;

    responsive to determining that the second entry is the most recently modified entry, replacing the first entry with the second entry to resolve the conflict when performing the data replication in the multi-mastered system, wherein the step of replacing the first entry with the second entry includes;

    sending, by the first data processing system, a request for a refresh operation to the second data processing system; and

    responsive to receiving the request;

    returning, by the second data processing system, an insert command including the second entry to the first data processing system;

    responsive to determining that the first entry is the most recently modified entry, replacing the second entry with the first entry to resolve the conflict, wherein the step of replacing the second entry with the first entry includes;

    discarding, by the first data processing system, the second update; and

    sending, by the first data processing system, an insert command including the first entry to the second data processing system; and

    responsive to determining the most recently modified entry, logging the least recently modified entry in a record that defines the conflict that has been resolved, wherein the step of replacing and logging are performed by the first data processing system when it is determined that the second entry is the most recently modified entry; and

    are performed by the second data processing system when it is determined that the first entry is the most recently modified entry.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×