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

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

          Activity

            Build couchbase-server-6.6.3-9811 contains kv_engine commit 8b2f1ea with commit message:
            MB-48179: [BP] Make SyncDelete update maxDelRevSeqno

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.3-9811 contains kv_engine commit 8b2f1ea with commit message: MB-48179 : [BP] Make SyncDelete update maxDelRevSeqno
            wayne Wayne Siu added a comment -

            Ashwin Govindarajulu
            Can you also verify the fix on 6.6.3-9811? Thanks.

            wayne Wayne Siu added a comment - Ashwin Govindarajulu Can you also verify the fix on 6.6.3-9811? Thanks.

            Build couchbase-server-7.1.0-1279 contains kv_engine commit 8b2f1ea with commit message:
            MB-48179: [BP] Make SyncDelete update maxDelRevSeqno

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1279 contains kv_engine commit 8b2f1ea with commit message: MB-48179 : [BP] Make SyncDelete update maxDelRevSeqno
            ashwin.govindarajulu Ashwin Govindarajulu added a comment - - edited

            Validated the fix on 6.6.3-9811 build.

            Note:

            - Tested with all combinations of sync+async sets/deletes.
            - Setup a XDCR cluster with 2i + cbas + FTS services active receiving the same mutations from cluster_1

             

            ashwin.govindarajulu Ashwin Govindarajulu added a comment - - edited Validated the fix on 6.6.3-9811 build. Note: - Tested with all combinations of sync+async sets/deletes. - Setup a XDCR cluster with 2i + cbas + FTS services active receiving the same mutations from cluster_1  

            Build couchbase-server-7.1.0-1332 contains kv_engine commit b0dd482 with commit message:
            MB-48179: Merge branch 'couchbase/mad-hatter' into couchbase/cheshire-cat

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1332 contains kv_engine commit b0dd482 with commit message: MB-48179 : Merge branch 'couchbase/mad-hatter' into couchbase/cheshire-cat

            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