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

[CBM] Merge may discard/disregard tombstones resulting in mutations being "revived"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.6.3, 4.6.4, 4.6.5, 6.5.0, 6.0.0, 5.5.0, 5.5.1, 5.5.2, 5.5.3, 6.0.1, 6.0.2, 5.5.4, 6.0.3, 5.5.5, 5.5.6, 6.0.4, 6.5.1, 6.0.5, 6.6.0, 6.6.1, 6.6.2, 6.5.2, 7.0.0
    • 7.0.2, 6.6.5
    • tools
    • Untriaged
    • 1
    • No

    Description

      What's the issue?
      As a space saving measure during a merge, 'cbbackupmgr' will discard tombstones where the sequence number is larger than the purge sequence number. When paired with the existing forward merge logic, this result in backups which contain "revived" documents.

      Steps to reproduce
      1) Spin up a single node cluster
      2) Limit it to 1 vBucket (must be CC+)
      3) Create 4 documents (key1, key2, key3, key4)
      4) Take a backup
      5) Delete 2 documents (key1, key4)
      6) Mutate a single document (key5)
      7) Take a backup
      8) Mutate a single document (key 2)
      9) Perform an unsafe purge
      10) Take a backup
      11) Merge all the previous backups

      We should see the merge complete successfully, whilst reporting that a single tombstone was "skipped".

      Using 'info' to look at the data, we'll see:

      Info Output

      -    Bucket  | Size      | Items | Mutations | Tombstones | Views | FTS | Indexes | CBAS |
      -    default | 196.28KiB | 5     | 4         | 1          | 0     | 0   | 0       | 0    |
      

      Note that we have four mutations, and only a single tombstone; key1 was "revived".

      What's the fix?
      We should remove the logic which is in place to skip purged tombstones during a merge.

      Attachments

        Issue Links

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

          Activity

            Approved by Arunkumar Senthilnathan in the Tools meeting for 7.0.1 and 6.6.4 (if and when it happens)

            pvarley Patrick Varley added a comment - Approved by Arunkumar Senthilnathan in the Tools meeting for 7.0.1 and 6.6.4 (if and when it happens)

            Build couchbase-server-7.0.1-5982 contains backup commit f3f3e44 with commit message:
            MB-47653 Remove merge tombstone purge logic

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.1-5982 contains backup commit f3f3e44 with commit message: MB-47653 Remove merge tombstone purge logic

            Build couchbase-server-7.1.0-1116 contains backup commit f3f3e44 with commit message:
            MB-47653 Remove merge tombstone purge logic

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1116 contains backup commit f3f3e44 with commit message: MB-47653 Remove merge tombstone purge logic

            Build couchbase-server-7.0.2-6516 contains backup commit 1fa4557 with commit message:
            MB-47653 [BP] Remove merge tombstone purge logic

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.2-6516 contains backup commit 1fa4557 with commit message: MB-47653 [BP] Remove merge tombstone purge logic

            Build couchbase-server-6.6.4-9903 contains backup commit 1fa4557 with commit message:
            MB-47653 [BP] Remove merge tombstone purge logic

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.4-9903 contains backup commit 1fa4557 with commit message: MB-47653 [BP] Remove merge tombstone purge logic

            Build couchbase-server-7.1.0-1157 contains backup commit 1fa4557 with commit message:
            MB-47653 [BP] Remove merge tombstone purge logic

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1157 contains backup commit 1fa4557 with commit message: MB-47653 [BP] Remove merge tombstone purge logic

            Confirmed that documents are no longer revived in this situtation. Closing.

            joe.mitchelljones Joe Mitchell Jones added a comment - Confirmed that documents are no longer revived in this situtation. Closing.

            People

              james.lee James Lee
              james.lee James Lee
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty