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

Replica is not resilient to receiving multiple Prepares for the same key

    XMLWordPrintable

Details

    Description

      Imagine an Active sending the following over DCP:

      1. PRE(key)
      2. ABORT(key)
      3. PRE(key)

      If the replica-connection drops after receiving PRE:1 and before receiving ABORT, then at re-connection Replica may receive PRE:3, as on disk we deduplicate Prepare and Abort.
      Currently, the code at Replica doesn't consider this scenario and it is likely to fail on some of the checks that we put in place for ensuring that we can never accept a Prepare if another Prepare is in flight.

      We need to create a set of valid seqnos for which this is allowed at stream reconnection (addStream as we may destroy the stream object). This set of valid seqnos should be (HCS...HPS]. Consider all the case where we have multiple disconnects. We need to take the union of the old and new sets.

      Attachments

        Issue Links

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

          Activity

            People

              ben.huddleston Ben Huddleston
              paolo.cocchi Paolo Cocchi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty