Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-9051

Upgrade on XDCR clusters from Version1 ( CAPI) to Version 2( Xmem) is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Blocker
    • 2.2.0
    • 2.2.0
    • XDCR
    • Security Level: Public
    • None

    Description

      1. Setup cluster 2:2 xdcr replciation ( by default CAPI)
      2. Upgrade Source to 2.2. ( XMem mode ) -> Destnation on older XDCR version.
      3. W/ Destination Upgrade (XMem) , Src CAPI, expect incompatibility and potential data-corruption

      Likewise w/ Src-> Dest incompatible versions.

      From Junyi

      The bottom-line is when users upgrade Couchbase servers, users need to ensure that BOTH SIDES can understand and support the replication mode in use:
      1) XMem mode: only 2.2 can understand it
      2) CAPI mode: both 2.2 and pre-2.2 can understand it.

      Now we go through a few examples:
      1) both sides are pre-2.2, upgrade to another pre-2.2 version:
      These cases are all safe since both 2.0 and 2.1 use CAPI mode XDCR.
      2) both sides are pre-2.2, but only destination upgrade to 2.2:
      This is also safe because source cluster (pre-2.2) still use CAPI after upgrade, and destination 2.2 cluster can understand CAPI mode XDCR for backward compatibility.

      In short, 1) and 2) are online upgrade safe.

      3) both sides are pre-2.2, but only source upgrade to 2.2:
      This is NOT safe because after upgrade source will use XMem by default, but destination does not support XMem at all. To make things worse, in some cases this may cause incorrect data replication since source assumes destination can do conflict resolution in ep_engine but early versions of Couchbase Server may not be able to do that.
      4) both sides are pre-2.2, and both upgrade to 2.2.
      This case is not safe either, because upgrade on both sides are NOT synchronized. If source finishes upgrade before destination, situation 3) can happen.

      In 3) and 4), to ensure safety, steps to upgrade are
      Step 1: stop/delete all XDCR activity on source side
      Step 2: upgrade
      Step 3: after 2) is over, restart/recreate XDCR, pick up the correct mode based on the new versions of Couchbase Server. If both sides are upgraded to 2.2, we can start XMem XDCR, otherwise please always use CAPI mode for safety.

      5) source is pre-2.2, destination is ES cluster, and source will be upgraded to 2.2
      Today ES cluster does not understand XMem mode XDCR, therefore please delete replication before upgrade source clusters. After source upgraded to 2.2, restart XDCR using CAPI mode.

      Attachments

        1. xdcr1.tar
          24.69 MB
        2. xdcr2.tar
          4.19 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Aliaksey Artamonau Aliaksey Artamonau (Inactive)
            ketaki Ketaki Gangal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty