Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-265

Post Upgrade fails to remove 2.0 era design docs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: SyncGateway
    • Security Level: Public
    • Labels:
      None
    • Sprint:
      CBG Sprint 17
    • Story Points:
      5

      Description

      On a Sync Gateway 2.1 node running against a cluster which has previous had 1.5 and 2.0 connected, the _post_upgrade endpoint will remove the 1.5 ddocs, but not the 2.0 ones.

      I suspect that 2.1 needs adding here: https://github.com/couchbase/sync_gateway/blob/master/db/design_doc.go#L27

      $ http 10.112.190.101:8092/test/_design/sync_gateway -aAdministrator:password -h
      HTTP/1.1 200 OK
      Cache-Control: must-revalidate
      Content-Length: 5898
      Content-Type: application/json
      Date: Mon, 11 Mar 2019 20:27:28 GMT
      Server: MochiWeb/1.0 (Any of you quaids got a smint?)
      X-Couchbase-Meta: {"id":"_design/sync_gateway","rev":"5-607ebfe6","type":"json"}
       
      $ http 10.112.190.101:8092/test/_design/sync_gateway_2.0 -aAdministrator:password -h
      HTTP/1.1 200 OK
      Cache-Control: must-revalidate
      Content-Length: 5898
      Content-Type: application/json
      Date: Mon, 11 Mar 2019 20:27:34 GMT
      Server: MochiWeb/1.0 (Any of you quaids got a smint?)
      X-Couchbase-Meta: {"id":"_design/sync_gateway_2.0","rev":"1-f3419ee9","type":"json"}
       
      $ http 10.112.190.101:8092/test/_design/sync_gateway_2.1 -aAdministrator:password -h
      HTTP/1.1 200 OK
      Cache-Control: must-revalidate
      Content-Length: 5898
      Content-Type: application/json
      Date: Mon, 11 Mar 2019 20:27:38 GMT
      Server: MochiWeb/1.0 (Any of you quaids got a smint?)
      X-Couchbase-Meta: {"id":"_design/sync_gateway_2.1","rev":"1-38fba0c0","type":"json"}
       
       
      $ http POST :4985/_post_upgrade
      HTTP/1.1 200 OK
      Content-Length: 113
      Content-Type: application/json
      Date: Mon, 11 Mar 2019 20:27:44 GMT
      Server: Couchbase Sync Gateway/2.1 branch/HEAD(nobranch) commit/a036bd8
       
      {
          "post_upgrade_results": {
              "db": {
                  "removed_design_docs": [
                      "sync_gateway",
                      "sync_housekeeping"
                  ],
                  "removed_indexes": []
              }
          }
      }
       
      $ http 10.112.190.101:8092/test/_design/sync_gateway -aAdministrator:password -h
      HTTP/1.1 404 Object Not Found
      Cache-Control: must-revalidate
      Content-Length: 41
      Content-Type: text/plain;charset=utf-8
      Date: Mon, 11 Mar 2019 20:27:49 GMT
      Server: MochiWeb/1.0 (Any of you quaids got a smint?)
       
      $ http 10.112.190.101:8092/test/_design/sync_gateway_2.0 -aAdministrator:password -h
      HTTP/1.1 200 OK
      Cache-Control: must-revalidate
      Content-Length: 5898
      Content-Type: application/json
      Date: Mon, 11 Mar 2019 20:27:53 GMT
      Server: MochiWeb/1.0 (Any of you quaids got a smint?)
      X-Couchbase-Meta: {"id":"_design/sync_gateway_2.0","rev":"1-f3419ee9","type":"json"}
       
      $ http 10.112.190.101:8092/test/_design/sync_gateway_2.1 -aAdministrator:password -h
      HTTP/1.1 200 OK
      Cache-Control: must-revalidate
      Content-Length: 5898
      Content-Type: application/json
      Date: Mon, 11 Mar 2019 20:27:55 GMT
      Server: MochiWeb/1.0 (Any of you quaids got a smint?)
      X-Couchbase-Meta: {"id":"_design/sync_gateway_2.1","rev":"1-38fba0c0","type":"json"}
      

        Attachments

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

          Activity

          Hide
          adamf Adam Fraser added a comment -

          This shouldn't break anything, as the design doc changes between 2.0 and 2.1 were just to remove some unused views, but I agree this should be fixed.

          Show
          adamf Adam Fraser added a comment - This shouldn't break anything, as the design doc changes between 2.0 and 2.1 were just to remove some unused views, but I agree this should be fixed.
          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-2.6.0-2 contains sync_gateway commit 02aaa9f with commit message:
          CBG-265: 2.0 design docs will be removed as part of _post_upgrade (#4033)

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-2.6.0-2 contains sync_gateway commit 02aaa9f with commit message: CBG-265 : 2.0 design docs will be removed as part of _post_upgrade (#4033)
          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-2.6.0-2 contains sync_gateway commit 02aaa9f with commit message:
          CBG-265: 2.0 design docs will be removed as part of _post_upgrade (#4033)

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-2.6.0-2 contains sync_gateway commit 02aaa9f with commit message: CBG-265 : 2.0 design docs will be removed as part of _post_upgrade (#4033)

            People

            Assignee:
            jacques.rascagneres Jacques Rascagneres
            Reporter:
            James Flather James Flather
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty