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

replica streaming triggers: ActiveStream::markDiskSnapshot:sent snapshot marker to client with snap start <= previous snap end

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Critical
    • 7.6.4
    • 7.6.0, Morpheus, 7.6.2, 7.6.1, 7.6.4
    • couchbase-bucket
    • None
    • Untriaged
    • 0
    • Unknown

    Description

      Following exception can be triggered when streaming from a replica vbucket

      CRITICAL Caught unhandled std::exception-derived exception. what(): ActiveStream::markDiskSnapshot:sent snapshot marker to client with snap start <= previous snap end vb:280 lastSentSnapStart:21402 lastSentSnapEnd:21469 snapStart:21402 snapEnd:27274 sid:sid:none producer name:eq_dcpq:dcpdrain-82249_0 lastReadSeqno:21401 curChkSeqno:27237
      

      The following sequence triggers.

      • Stream begins from 0
      • Backfill triggered, e.g. seqno 1 to 100 from backfill, but during markDiskSnapshot we extend the snapshot into memory (merge)
      • backfill transitions to in-memory, trying to send 101 to 150.
      • But cursor dropped at say 120.
      • next backfill scheduled for 120 to 150
      • markDiskSnapshot now tries to send a snapshot 120 to 150 and we hit the exception.

      This occurs because from the logic the second snapshot is not following the first.

      E.g. we've sent

      • snapshot 1 to 150
      • snapshot 120 to 150

      At this point i don't believe this to be a wider protocol bug, I don't believe DCP guarantees it would reach the end of the snapshot before starting a new one, e.g. both the following are valid.

      • snapshot 1 to 150
      • snapshot 151 to 160

      and

      • snapshot 1 to 150
      • snapshot 120 to 150

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty