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

HPS not updated in PassiveDM if a Prepare is removed before it is locally-satisfied

    XMLWordPrintable

Details

    Description

      That may happen at Replica at Commit. E.g.

      1. topology: {A, R1, R2}
      2. A receives Prepare{s:1, Level:PersistToMajority} and sends it to R1/R2
      3. s:1 persisted and ack'ed by A and R1
      4. A sends Commit{s:1} to R1/R2
      5. R2 receives Commit{s:1} and removes Prepare{s:1} from PassiveDM
      6. Prepare{s:1} persisted on R2
      7. the flusher calls back to PassiveDM for updating the HPS
      8. the update is skipped because the tracked Container in PassiveDM is empty

      Note that in PassiveDM the HPS is of type:

      struct DurabilityMonitor::Position {
          Container::iterator it;
          WeaklyMonotonic<int64_t, ThrowExceptionPolicy> lastWriteSeqno{0};
      }
      

      While Position::it can point to Container::end (which is expected in the case described), Position::lastWriteSeqno must always be set to the right seqno.

      Attachments

        For Gerrit Dashboard: MB-34151
        # Subject Branch Project Status CR V

        Activity

          People

            paolo.cocchi Paolo Cocchi
            paolo.cocchi Paolo Cocchi
            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