Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-3845

[3.1.6 backport] updateSeq must happen after DCP callback invocation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.6
    • None
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 149
    • 1

    Description

      We're currently updating the last processed sequence before invoking the DCP callback.  In the majority of cases this is harmless, as the metadata won't be persisted unless incrementCheckpoint is called (which happens after the callback).

      Similarly, in the case of node failure, the updated sequence will only be in memory and not persisted, so shouldn't cause a problem.

      However, there appears to be a corner case associated with pindex rebalance.  When a feed is gracefully closed it will trigger persistence of the metadata when the stream is reopened, which has the potential to pick up an updated sequence associated with the previous pindex (which may include an in-flight sequence update).  If that in-flight update subsequently fails, the DCP checkpoint will have been moved past the mutation.

      Attachments

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

        Activity

          People

            ben.brooks Ben Brooks
            adamf Adam Fraser
            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