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

[N1FTY] N1QL+SEACH : n1fty: gRPC client unavailable, try refreshing

    XMLWordPrintable

    Details

    • Triage:
      Untriaged
    • Story Points:
      1
    • Is this a Regression?:
      Unknown

      Description

      Build: 6.5.1-6305

      1. Have 3 node cluster with kv+n1ql, index and search on each node
      2. Load travel sample
      3. create default fts index
      4. Ensure below query returns results:

      select airportname from `travel-sample` where search(default, {"query": {
          "query": "airport"
        }})
      

      5. Rebalance in 4th node with kv + search services
      6. Stop rebalance during kv phase
      7. Run A N1QL query and n1ql - search query

      N1ql + search query from query workbench fails with below:

      code	msg	query
      5000	"n1fty: gRPC client unavailable, try refreshing"	"select airportname from `travel-sample` where search(default, {\"query\": {\n    \"query\": \"airport\"\n  }})"
      
      

      Logs:

      https://cb-jira.s3.us-east-2.amazonaws.com/logs/rebalance/collectinfo-2020-09-24T003727-ns_1%40172.23.121.65.zip
      https://cb-jira.s3.us-east-2.amazonaws.com/logs/rebalance/collectinfo-2020-09-24T003727-ns_1%40172.23.121.66.zip
      https://cb-jira.s3.us-east-2.amazonaws.com/logs/rebalance/collectinfo-2020-09-24T003727-ns_1%40172.23.121.67.zip
      https://cb-jira.s3.us-east-2.amazonaws.com/logs/rebalance/collectinfo-2020-09-24T003727-ns_1%40172.23.121.68.zip

        Attachments

          Issue Links

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

            Activity

            Hide
            abhinav Abhinav Dangeti added a comment - - edited

            Hi Sreekanth Sivasankaran, would you take the first look at this?

            Show
            abhinav Abhinav Dangeti added a comment - - edited Hi Sreekanth Sivasankaran , would you take the first look at this?
            Hide
            abhinav Abhinav Dangeti added a comment -

            I've found the issue in selecting a random entry from the connections' serverMap.

            Here's a sample server Map:

            map[int]string{0:"127.0.0.1:9203", 2:"10.0.0.44:9201"} 

            We seem to try to choose a randomNodeIndex by considering the length of the serverMap which in this situation returned "1".

            randomNodeIndex := r1.Intn(len(c.serverMap)) 

            Next we try to fetch the entry for "1" from the serverMap, which returns empty ..

            connPool := c.gRPCConnMap[c.serverMap[randomNodeIndex]] 

            I'll put a fix up for this soon.

            Show
            abhinav Abhinav Dangeti added a comment - I've found the issue in selecting a random entry from the connections' serverMap. Here's a sample server Map: map[ int ]string{ 0 : "127.0.0.1:9203" , 2 : "10.0.0.44:9201" } We seem to try to choose a randomNodeIndex by considering the length of the serverMap which in this situation returned "1". randomNodeIndex := r1.Intn(len(c.serverMap)) Next we try to fetch the entry for "1" from the serverMap, which returns empty .. connPool := c.gRPCConnMap[c.serverMap[randomNodeIndex]] I'll put a fix up for this soon.
            Show
            abhinav Abhinav Dangeti added a comment - http://review.couchbase.org/c/n1fty/+/136848
            Hide
            Sreekanth Sivasankaran Sreekanth Sivasankaran added a comment -

            I guess the serverMap could be just an array than a map in a long term fix..

            Show
            Sreekanth Sivasankaran Sreekanth Sivasankaran added a comment - I guess the serverMap could be just an array than a map in a long term fix..
            Hide
            abhinav Abhinav Dangeti added a comment -

            I think that's a good idea. Let me update the patches.

            Show
            abhinav Abhinav Dangeti added a comment - I think that's a good idea. Let me update the patches.
            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-7.0.0-3207 contains n1fty commit 02d39f1 with commit message:
            MB-41634: Set the index for the serverMap incrementally

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-3207 contains n1fty commit 02d39f1 with commit message: MB-41634 : Set the index for the serverMap incrementally
            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-6.6.1-9081 contains n1fty commit 02d39f1 with commit message:
            MB-41634: Set the index for the serverMap incrementally

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.1-9081 contains n1fty commit 02d39f1 with commit message: MB-41634 : Set the index for the serverMap incrementally
            Hide
            girish.benakappa Girish Benakappa added a comment -

            Verified in 6.5.1-6306, 6.6.1 build 9081, 7.0.0 build 3208 based on testcases: https://docs.google.com/spreadsheets/d/1xXThDbJXwC8ibUTqlzTsRcUrl8DOrmYKUKCs7Vast_Q/edit#gid=0

            Show
            girish.benakappa Girish Benakappa added a comment - Verified in 6.5.1-6306, 6.6.1 build 9081, 7.0.0 build 3208 based on testcases: https://docs.google.com/spreadsheets/d/1xXThDbJXwC8ibUTqlzTsRcUrl8DOrmYKUKCs7Vast_Q/edit#gid=0

              People

              Assignee:
              abhinav Abhinav Dangeti
              Reporter:
              girish.benakappa Girish Benakappa
              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