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

[BAR] udf is not excluded during restore using --exclude-data option

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.0.1
    • 7.0.2
    • query
    • Centos7
      7.0.1-5956-enterprise
    • Untriaged
    • 1
    • Unknown

    Description

      To repro:

      • create bucket1 and bucket2
      • create scope/collections:
        • create scope bucket1.scope1;
        • create scope bucket2.scope2;
        • create collection bucket1.scope1.collection1;
        • create collection bucket2.scope2.collection2;
      • create UDF:
        • CREATE FUNCTION func1() { 0 };
        • CREATE FUNCTION default:bucket1.scope1.func1() { 0 };
        • CREATE FUNCTION default:bucket2.scope2.func1() { 0 };
      • Check system cat:
        • select f.identity.name, f.identity.type, f.identity.`scope` from system:functions as f;
      • Backup:
        • ./cbbackupmgr config -a /backup-1 -r my_backup
        • ./cbbackupmgr backup -a /backup-1 -r my_backup -c http://localhost:8091 -u Administrator -p password
      • Drop functions:
        • drop function default:bucket1.scope1.func1;
        • drop function default:bucket2.scope2.func1;
      • Restore with exclude
        • ./cbbackupmgr restore -a /backup-1 -r my_backup -c http://localhost:8091 -u Administrator -p password --exclude-data bucket2.scope2.collection2
        • or
        • ./cbbackupmgr restore -a /backup-1 -r my_backup -c http://localhost:8091 -u Administrator -p password --exclude-data bucket2.scope2
      • Check system cat:
        • select f.identity.name, f.identity.type, f.identity.`scope` from system:functions as f;

      Post restore I still see both func1 for scope1 and scope2 present:

      cbq> select f.identity.name, f.identity.type, f.identity.`scope` from system:functions as f;
      {
          "requestID": "f5a86000-9744-4410-ac02-881a9ecfacc4",
          "signature": {
              "name": "json",
              "scope": "json",
              "type": "json"
          },
          "results": [
          {
              "name": "func1",
              "scope": "scope2",
              "type": "scope"
          },
          {
              "name": "func1",
              "scope": "scope1",
              "type": "scope"
          },
          {
              "name": "func1",
              "type": "global"
          } 

      Attachments

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

        Activity

          There are no commits yet on this issue.

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            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