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

Collections: DCP stream-request must include the last manifest-UID the client received (for resuming a stream)

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 6.5.0
    • master
    • couchbase-bucket
    • None

    Description

      For safe failover and stream resumption, the client must include the manifest UID they last received.

      recap: DCP transmits collection create/drop/flush using a DCP system event message, that message encodes the UID of manifest which introduced/removed/flushed the collection. The client must store the UID so they can safely resume the stream.

      The main scenario the UID assists with is failover following a collection drop or flush.

      • On vbucket A the client observed a collection drop(X), and in response to the collection drop the client is free to discard all data associated with collection X.
      • Failover occurs, and the client must connect and resume from vbucket A'
      • vbucket A' has yet to drop X, so is free to accept mutations for X.
      • Allowing the client to connect to A' can mean we now stream X mutations, but the client dropped X and should not see any more X mutations.

      By requiring the manifest UID we can temp fail the stream-request to A', which should be short lived because of the way failover is intending to bring vbuckets up-to-speed with the latest manifest.

      This task covers

      • Adding a new "MANFIEST_AHEAD" error to memcache protocol (for stream-request)
      • Code for the stream-request command, so clients can encode the UID (planning on using the new collections JSON doc for carrying the UID value).
      • Code for checking the stream-request against the vbucket's manifest
      • protocol docs updated so clients can work with the protocol.

      Attachments

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

        Activity

          People

            jwalker Jim Walker
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty