Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-9735

Avoid wan-copy region command to copy entries updated after it started

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.15.0
    • wan

    Description

      The wan-copy region command must not copy entries that have been created or updated after the command has started to copy entries.

      There are two reasons for this:

      • Efficiency: entries copied after the command has been started will be replicated by the gateway sender anyway so the copying of these entries by the command will be a waste of processing resources and duplicated events will arrive to the remote site.
      • Problematic reordering of events in the receiving side: if an entry is modified in the same millisecond in the source site and the wan-copy region command tries to copy this entry, it might happen that the command reads the first version of the entry and sends it to the remote site. The gateway sender will also send two events to the remote site, one with the first version of the entry and one with the second. If the event of the wan-copy region command containing the first version of the entry arrives to the remote site after the second event sent by the gateway sender, it will overwrite the second version causing an inconsistency between the two sites. The reason is that the granularity of the timestamp of events is of milliseconds and therefore the conflict resolver on the receiving side will not be able to detect that the event sent by the command is prior to the one received by the gateway sender.
        If entries updated while the command is running are not copied by the command, this problem is avoided.

       

      Attachments

        Issue Links

          Activity

            People

              alberto.gomez Alberto Gomez
              alberto.gomez Alberto Gomez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: