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

SyncDeletes do not update maxDelRevSeqno, which can cause rev ids to go backwards

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown
    • KV-Engine Sprint 2021 August, KV-Engine-Sept-21

    Description

      Spin out of a customer issue where they were seeing redid go backwards.

      Thanks to Graham Pople providing a reproduction.

      James Lee kindly converted it to "go" version, which I have attached

      It performs 3 operations on the same key - "daniel". The operations and rev id is as follows:

      standard set
      rev_id: 1
      majority sync-write delete
      rev_id: 2
      majority sync-write set
      rev_id: 1

      (Note the key is "daniel" which corresponds to vbucket 644)

      Worth noting that all non-sync operations work as expected e.g.
      standard set
      rev_id: 1
      standard delete
      rev_id: 2
      standard set
      rev_id: 3

      Also the following works as expected e.g.
      standard set
      rev_id: 1
      standard delete
      rev_id: 2
      majority sync-write set
      rev_id: 3

      However the following breaks
      standard set
      rev_id: 1
      majority sync-write delete
      rev_id: 2
      standard set
      rev_id: 1

      So the issue appears to be with sync-write delete

      Attachments

        1. go.mod
          0.3 kB
        2. go.sum
          2 kB
        3. v9.go
          3 kB

        Issue Links

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

          Activity

            People

              ashwin.govindarajulu Ashwin Govindarajulu
              owend Daniel Owen
              Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty