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

Mix Mode: No error when we add new function

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 6.6.3, 7.0.2
    • 7.1.0
    • eventing

    Description

      • Create 4 node mix clusters (6.6.3 and 7.0.2)
      • Try to add a new handler from 6.6.3

      Observed: Successfully add a function but resync call delete that function

      • Try to add a new handler from 7.0.2

      Observed: No error, nothing on UI nor add function pop-up shows up

      Attachments

        Issue Links

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

          Activity

            vikas.chaudhary Vikas Chaudhary created issue -
            vikas.chaudhary Vikas Chaudhary made changes -
            Field Original Value New Value
            Description * Create 4 node mix clusters (6.6.3 and 7.0.2)
             * Try to add a new handler from 6.6.3

            *Observed:* Successfully add a function but resync call delete that function
             * Try to add a new handler from 7.0.2

            *Observed:* No error, nothing on UI nor add function pop-up
            * Create 4 node mix clusters (6.6.3 and 7.0.2)
             * Try to add a new handler from 6.6.3

            *Observed:* Successfully add a function but resync call delete that function
             * Try to add a new handler from 7.0.2

            *Observed:* No error, nothing on UI nor add function pop-up shows up
            jeelan.poola Jeelan Poola made changes -
            Assignee Jeelan Poola [ jeelan.poola ] Ankit Prabhu [ ankit.prabhu ]
            jeelan.poola Jeelan Poola made changes -
            Fix Version/s Neo [ 17615 ]
            Fix Version/s 7.0.2 [ 18012 ]
            jeelan.poola Jeelan Poola made changes -
            Assignee Ankit Prabhu [ ankit.prabhu ] Srinivasan Raman [ JIRAUSER25123 ]
            jeelan.poola Jeelan Poola added a comment - - edited

            Srinivasan Raman Could you please help check this once? I wonder if some UI errors are getting masked
            Vikas Chaudhary Could you confirm what behaviour you see on the REST end points?

            jeelan.poola Jeelan Poola added a comment - - edited Srinivasan Raman Could you please help check this once? I wonder if some UI errors are getting masked Vikas Chaudhary Could you confirm what behaviour you see on the REST end points?

            Jeelan Poola:

            There are two things reported in this bug.

            1) Create 4 node mix clusters (6.6.3 and 7.0.2), Try to add a new handler from 6.6.3

            In this, the 6.6.3's "Add Function" logic kicks in. This has a broken Add Function logic - Fires an import API asynchronously, disregards the API response totally, adds the function to the browser's list of functions and routes the user to JavaScript code editor. This approach has numerous issues - list will display the function whose import failed, all actions on this function will fail (as it does not actually exist in the backend), the function will disappear once the resync is done etc. The import failure is what Deepika Verma reported in https://issues.couchbase.com/browse/MB-48319.

             

            These were fixed recently in 7.0.2.

             

            2) Create 4 node mix clusters (6.6.3 and 7.0.2), Try to add a new handler from 7.0.2

             

            This is a bug introduced by my fix for the issues listed above. In a mixed mode cluster, the call to retrieve scopes for all buckets fails. A variable that holds a Map of all keyspaces ends up being null - I am missing a null check where I access this Map.

             

             

            srinivasan.raman Srinivasan Raman added a comment - Jeelan Poola : There are two things reported in this bug. 1) Create 4 node mix clusters (6.6.3 and 7.0.2), Try to add a new handler from 6.6.3 In this, the 6.6.3's "Add Function" logic kicks in. This has a broken Add Function logic - Fires an import API asynchronously, disregards the API response totally, adds the function to the browser's list of functions and routes the user to JavaScript code editor. This approach has numerous issues - list will display the function whose import failed, all actions on this function will fail (as it does not actually exist in the backend), the function will disappear once the resync is done etc. The import failure is what Deepika Verma  reported in  https://issues.couchbase.com/browse/MB-48319 .   These were fixed recently in 7.0.2.   2) Create 4 node mix clusters (6.6.3 and 7.0.2), Try to add a new handler from 7.0.2   This is a bug introduced by my fix for the issues listed above. In a mixed mode cluster, the call to retrieve scopes for all buckets fails. A variable that holds a Map of all keyspaces ends up being null - I am missing a null check where I access this Map.    

            Jeelan Poola: One additional note - I've fixed the null check and push it out. With this, the Add Function dialog will show up. However, as we will not have any scopes / collections in the mixed mode, one cannot actually select a valid keyspace for either "Listen To Location" or "Eventing Storage" to successfully add a function. FYI. Even if one were to be able to select keyspaces, the backend Import call will fail as long as the cluster is in mixed mode.

            srinivasan.raman Srinivasan Raman added a comment - Jeelan Poola : One additional note - I've fixed the null check and push it out. With this, the Add Function dialog will show up. However, as we will not have any scopes / collections in the mixed mode, one cannot actually select a valid keyspace for either "Listen To Location" or "Eventing Storage" to successfully add a function. FYI. Even if one were to be able to select keyspaces, the backend Import call will fail as long as the cluster is in mixed mode.
            jeelan.poola Jeelan Poola made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            jeelan.poola Jeelan Poola made changes -
            Link This issue is cloned by MB-48337 [ MB-48337 ]
            jeelan.poola Jeelan Poola made changes -
            Fix Version/s 7.0.2 [ 18012 ]
            jeelan.poola Jeelan Poola added a comment -

            Thank you Srinivasan Raman! We must fix the 'null' check in 7.0.2, hence I created the backport for 7.0.2 MB-48337.

            jeelan.poola Jeelan Poola added a comment - Thank you Srinivasan Raman ! We must fix the 'null' check in 7.0.2, hence I created the backport for 7.0.2 MB-48337 .

            Sure, Jeelan Poola. Once the code review is complete, I'll push the change to 7.0.2 as well.

            srinivasan.raman Srinivasan Raman added a comment - Sure, Jeelan Poola . Once the code review is complete, I'll push the change to 7.0.2 as well.

            Build couchbase-server-7.1.0-1251 contains eventing commit 336b016 with commit message:
            MB-48316: Handle bucketScopes call failure in mixed-mode

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1251 contains eventing commit 336b016 with commit message: MB-48316 : Handle bucketScopes call failure in mixed-mode
            srinivasan.raman Srinivasan Raman made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            srinivasan.raman Srinivasan Raman made changes -
            Link This issue backports to MB-48319 [ MB-48319 ]
            vikas.chaudhary Vikas Chaudhary made changes -
            Assignee Srinivasan Raman [ JIRAUSER25123 ] Sujay Gad [ JIRAUSER25279 ]
            sujay.gad Sujay Gad added a comment -

            Validated the fix on Enterprise Edition 7.1.0 build 2017.

            sujay.gad Sujay Gad added a comment - Validated the fix on Enterprise Edition 7.1.0 build 2017.
            sujay.gad Sujay Gad made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              sujay.gad Sujay Gad
              vikas.chaudhary Vikas Chaudhary
              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