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

[BP 7.0.2] - XDCR - backfill replication spec reloading could misload spec from wrong data

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • No

    Description

      When XDCR is cold stopped and restarted, it reloads all metadata from metakv, such as replication spec. With 7.0, it also loads backfill replication specs.

      Backfill replication specs, and compressed backfill mapping files all live under the same "directory" under metakv. The current logic will try to load a spec only once by checking a specific prefix. If the prefix has been processed, it'll skip onto the next "backfill spec".

      There is a mistake in the reloading logic where the backfill replication service doesn't check if the loaded metakv doc is a backfill mapping doc instead of a backfill replication spec doc. This will cause the reloading mechanism to try to unmarshal the backfill mapping doc into the backfill replication spec, which will not return an error and thus fail silently. The backfill spec "reloaded" will have been empty and no tasks will be launched. 

      This will cause potential data loss (if goxdcr happens to be bounced/restarted)

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            Build couchbase-server-7.0.1-5995 contains goxdcr commit 6d4d46d with commit message:
            MB-47778 - backfill spec service may not load backfill spec correctly when cold starting

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.1-5995 contains goxdcr commit 6d4d46d with commit message: MB-47778 - backfill spec service may not load backfill spec correctly when cold starting

            People

              neil.huang Neil Huang
              neil.huang Neil Huang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty