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

[cbdatarecovery] Documents in a non-default collection inside the default scope will not be recovered

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.1.0
    • 7.1.0
    • tools
    • Triaged
    • 1
    • No
    • Tools 2022-March

    Description

      Reproduction

      1. Create a bucket
      2. Create a collection inside of the default scope
      3. Add some documents to this collection and to the default collection
      4. Try to use cbdatarecovery to recover from the couchstore file to a cluster

      What happens

      We'd expect all the documents - ie each one in each collection - to be restored. However, only those in the default collection are restore

      Explanation

      During the recovery we read the couchstore file to get the collection manifest. The keys that end with open are created on demand - so if you don't have a non-default scope or collection they aren't created. In the reproduction steps the collection document will exist but not the scope one, which makes the function return an error. This bubbles up to  recovery where we special case it and return the default manifest.

      Note that this will only happen if there is only the default scope. As soon as there is more than one scope this problem resolves itself.

      Attachments

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

        Activity

          People

            thuan Thuan Nguyen
            Matt.Hall Matt Hall
            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