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

Ensure that backup and transactions are using same metadata

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 6.5.0
    • 6.5.0
    • tools
    • None

    Description

      It was discussed on Slack with the backup team that the transactions xattrs metadata, which is also checked by the restore tools, would be changing slightly to be made more compact.  This ticket is to verify that the relevant changes were made and that the restore tools look at the new metadata, and if not, to make those changes.

      The metadata structure is in the transactions RFC and reproduced here for convenience:

      {
        "xattrs": {
          "txn": {
            "id": {
              "txn": "6a919480-d9fd-4d0d-9074-2506b3a210d1",
              "atmpt": "91a8e712-b407-497d-a0de-97835cf0c7cc"
            },
            "atr": {
              "id": "atr-324-#37",
              "bkt": "default",
              "coll": "_default._default"
            },
            "op": {
              "type": "replace",
              "stgd": {
                "val": 2
              }
            },
            "restore": {
              "CAS": "0x15a9edcf58d60000",
              "exptime": 0,
              "revid": "80"
            }
          }
        }
      }
       
       

      The fields that restore will want are those under the "restore" key, plus the "op.type".

      op.type is required for something discussed on Slack: if op.type == "insert", then the document is a marker document that's been created for the transaction.  E.g. it did not exist before the transaction, and so it should not be restored at all - this document should be skipped by the restore process.

       

      Attachments

        Issue Links

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

          Activity

            People

              pvarley Patrick Varley (Inactive)
              graham.pople Graham Pople
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty