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

DCP: collection filtering + sync-writes don't work together

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Major
    • Morpheus
    • 7.0.0, 7.0.1
    • couchbase-bucket
    • None
    • 1

    Description

      I've disabled filtering + sync-writes as part of MB-47009, but this MB tracks what we know needs doing to enable these two features (it's possible, but no one yet requires).

      Two issues:.

      First is no test coverage, so hard to know how well these two DCP modes operated together.

      Second is that we have at least one issue in code (iirc this was a concious decision, but we should of probably disabled filtering + sync-writes in 7.0). Filtering means that a snapshot can have 'gaps' where we've skipped a mutation for a different collection, if that gap lands at the end of a snapshot the 7.0 added "DCP seqno advanced" message is used to close the snapshot. However the function which decides if a DCP seqno advance is allowed will return false if sync-writes are enabled on the stream.

      Now consider a snapshot and a DCP client filtering for collection "c1" only, if the end of the snapshot is a prepare for "c2", we won't complete the snapshot, the prepare gets dropped from the clients output, but the logic in ActiveStream means it won't get a seqno-advance to progress the client correctly

      Code in question here

      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:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty