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

Magma compacts away uncompleted prepares

    XMLWordPrintable

Details

    • Triaged
    • 1
    • No

    Description

      The issue here is that we are comparing ctx->max_purge_seqno to seqno which is incorrect. We should actually be comparing if seqno <= ctx->highCompletedSeqno. This means that any prepare we see with a seqno greater than anything we have already purged will be purged.

      // We can remove any prepares that have been completed. This works
                  // because we send Mutations instead of Commits when streaming from
                  // Disk so we do not need to send a Prepare message to keep things
                  // consistent on a replica.
                  if (magmakv::isPrepared(metaSlice)) {
                      if (cbCtx.ctx->max_purged_seq < seqno) {
                          cbCtx.ctx->stats.preparesPurged++;
                          return true;
                      }
                  }
      

      Attachments

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

        Activity

          People

            ben.huddleston Ben Huddleston
            ben.huddleston Ben Huddleston
            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