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

Collections: memcached get_collection_id cannot accept 'max' input

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      On build 7.0.0-4627

      1. create 1 collection on _default scope. collection name is "AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000"
      Now there are 2 collection in the server. One is the _default collection and other is the newly created collection
      2. created 2 same documents in both the collections through UI
      3. created primary index on both the collections
      4. Ran insert query without transactions

      cbq> INSERT INTO default:default.`_default`.`_default` (KEY k1, value t) SELECT DISTINCT t.name AS k1,t FROM default:default.`_default`.`_default` t WHERE  job_title='Sales' LIMIT 10 RETURNING *
         > ;
      {
          "requestID": "6fb4ad14-578f-4c5d-8cea-f1196f283bb0",
          "signature": {
              "*": "*"
          },
          "results": [
          {
              "_default": {
                  "click": "to edit",
                  "job_title": "Sales",
                  "name": "James Bond",
                  "with JSON": "there are no reserved field names"
              }
          },
          {
              "_default": {
                  "click": "to edit",
                  "job_title": "Sales",
                  "name": "John Doe",
                  "with JSON": "there are no reserved field names"
              }
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "296.29184ms",
              "executionTime": "295.828446ms",
              "resultCount": 2,
              "resultSize": 398,
              "serviceLoad": 25,
              "mutationCount": 2
          }
      }
      cbq> INSERT INTO default:default.`_default`.`AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000` (KEY k1, value t) SELECT DISTINCT t.name AS k1,t FROM default:default.`_default`.`AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000` t WHERE  job_title='Sales' LIMIT 10 RETURNING *;
      {
          "requestID": "71b092d2-4775-4623-97c8-d17c2aeb03f5",
          "signature": {
              "*": "*"
          },
          "results": [
          {
              "AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000": {
                  "click": "to edit",
                  "job_title": "Sales",
                  "name": "James Bond",
                  "with JSON": "there are no reserved field names"
              }
          },
          {
              "AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000": {
                  "click": "to edit",
                  "job_title": "Sales",
                  "name": "John Doe",
                  "with JSON": "there are no reserved field names"
              }
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "6.445578ms",
              "executionTime": "5.720692ms",
              "resultCount": 2,
              "resultSize": 884,
              "serviceLoad": 25,
              "mutationCount": 2
          }
      }
      

      5. delete the newly created docs in both collection and run the same query by starting the transaction

      cbq> begin work;
      {
          "requestID": "c4bb2101-3a45-43c2-93dc-df07d683f378",
          "signature": "json",
          "results": [
          {
              "txid": "f1bc6dee-d180-41b8-895a-1d3d40117bd3"
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "1.45588ms",
              "executionTime": "1.380462ms",
              "resultCount": 1,
              "resultSize": 62,
              "serviceLoad": 25,
              "transactionElapsedTime": "20.204µs",
              "transactionRemainingTime": "1m59.999974099s"
          }
      }
      cbq> INSERT INTO default:default.`_default`.`_default` (KEY k1, value t) SELECT DISTINCT t.name AS k1,t FROM default:default.`_default`.`_default` t WHERE  job_title='Sales' LIMIT 10 RETURNING *;
      {
          "requestID": "8e2e6fe5-d688-42cb-9dfd-cd8f227c26ce",
          "signature": {
              "*": "*"
          },
          "results": [
          {
              "_default": {
                  "click": "to edit",
                  "job_title": "Sales",
                  "name": "James Bond",
                  "with JSON": "there are no reserved field names"
              }
          },
          {
              "_default": {
                  "click": "to edit",
                  "job_title": "Sales",
                  "name": "John Doe",
                  "with JSON": "there are no reserved field names"
              }
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "145.102542ms",
              "executionTime": "145.013964ms",
              "resultCount": 2,
              "resultSize": 398,
              "serviceLoad": 6,
              "mutationCount": 2,
              "transactionElapsedTime": "12.368500342s",
              "transactionRemainingTime": "1m47.631491211s"
          }
      }
      cbq> INSERT INTO default:default.`_default`.`AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000` (KEY k1, value t) SELECT DISTINCT t.name AS k1,t FROM default:default.`_default`.`AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000` t WHERE  job_title='Sales' LIMIT 10 RETURNING *;
      {
          "requestID": "5f4d2412-48cf-45c1-a09d-0acd107e0f7c",
          "signature": {
              "*": "*"
          },
          "results": [
          ],
          "errors": [
              {
                  "cause": {
                      "cause": {
                          "bucket": "default",
                          "context": "Key length exceeds 251",
                          "document_key": "_default.AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000",
                          "error_description": "Invalid packet",
                          "error_name": "EINVAL",
                          "last_connection_id": "b48dd26252e3f576/026e247760ca7847",
                          "last_dispatched_from": "10.112.190.101:60801",
                          "last_dispatched_to": "10.112.190.101:11210",
                          "msg": "invalid argument",
                          "opaque": 7,
                          "status_code": 4
                      },
                      "raise": "failed",
                      "retry": false,
                      "rollback": true
                  },
                  "code": 17017,
                  "msg": "Transaction fetch error"
              }
          ],
          "status": "errors",
          "metrics": {
              "elapsedTime": "4.784327ms",
              "executionTime": "4.552645ms",
              "resultCount": 0,
              "resultSize": 0,
              "serviceLoad": 6,
              "transactionElapsedTime": "20.07436042s",
              "transactionRemainingTime": "1m39.925586846s",
              "errorCount": 1
          }
      }
      

      This is not related to key length have more characters. As such the key length in both the doc used is very less. If the same query can pass outside transaction why it has to fail inside the transaction

      Attachments

        Issue Links

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

          Activity

            marco.greco Marco Greco added a comment -

            FYI, the gomemcached side is done.

            marco.greco Marco Greco added a comment - FYI, the gomemcached side is done.

            Daniel Owen, I am working with Pablo Silberkasten (who is increasingly working the schedule) to yes, have it done in the next couple of SDK releases. From here, that probably means in a release (which QE and others depend on for testing) in mid-April/early-May. It's not a large change, just may be risky in that the downstream consequences may not be fully covered outside SDKs.

            That means you'll be able to remove the old interface around then. Please track the CBD for details.

            ingenthr Matt Ingenthron added a comment - Daniel Owen , I am working with Pablo Silberkasten (who is increasingly working the schedule) to yes, have it done in the next couple of SDK releases. From here, that probably means in a release (which QE and others depend on for testing) in mid-April/early-May. It's not a large change, just may be risky in that the downstream consequences may not be fully covered outside SDKs. That means you'll be able to remove the old interface around then. Please track the CBD for details.
            owend Daniel Owen added a comment -

            Great many thanks Matt Ingenthron and Pablo Silberkasten I will set the due date for May 7th and track the CBD.

            owend Daniel Owen added a comment - Great many thanks Matt Ingenthron and Pablo Silberkasten I will set the due date for May 7th and track the CBD.

            Verified on 7.0.0-4990

            cbq> begin work;
            {
                "requestID": "80edd282-59fb-46f4-a1d1-12c8a3d712e7",
                "signature": "json",
                "results": [
                {
                    "txid": "299dc338-2f0f-4a93-85fe-e38d4283b569"
                }
                ],
                "status": "success",
                "metrics": {
                    "elapsedTime": "1.464192ms",
                    "executionTime": "1.294904ms",
                    "resultCount": 1,
                    "resultSize": 62,
                    "serviceLoad": 6,
                    "transactionElapsedTime": "194.274µs",
                    "transactionRemainingTime": "1m59.999754753s"
                }
            }
            cbq> INSERT INTO default:default.`_default`.`_default` (KEY k1, value t) SELECT DISTINCT t.name AS k1,t FROM default:default.`_default`.`_default` t WHERE  job_title='Sales' LIMIT 10 RETURNING *;
            {
                "requestID": "f095f196-ecb8-47f0-a0cd-1b42b0ec6990",
                "signature": {
                    "*": "*"
                },
                "results": [
                {
                    "_default": {
                        "click": "to edit",
                        "job_title": "Sales",
                        "name": "James Bond",
                        "with JSON": "there are no reserved field names"
                    }
                },
                {
                    "_default": {
                        "click": "to edit",
                        "job_title": "Sales",
                        "name": "John Doe",
                        "with JSON": "there are no reserved field names"
                    }
                }
                ],
                "status": "success",
                "metrics": {
                    "elapsedTime": "10.770518ms",
                    "executionTime": "10.509852ms",
                    "resultCount": 2,
                    "resultSize": 398,
                    "serviceLoad": 1,
                    "mutationCount": 2,
                    "transactionElapsedTime": "3.558740496s",
                    "transactionRemainingTime": "1m56.441234842s"
                }
            }
            cbq> INSERT INTO default:default.`_default`.`AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000` (KEY k1, value t) SELECT DISTINCT t.name AS k1,t FROM default:default.`_default`.`AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000` t WHERE  job_title='Sales' LIMIT 10 RETURNING *;
            {
                "requestID": "94f56024-b69f-451a-a682-b0562ffe20ad",
                "signature": {
                    "*": "*"
                },
                "results": [
                {
                    "AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000": {
                        "click": "to edit",
                        "job_title": "Sales",
                        "name": "John Doe",
                        "with JSON": "there are no reserved field names"
                    }
                },
                {
                    "AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000": {
                        "click": "to edit",
                        "job_title": "Sales",
                        "name": "James Bond",
                        "with JSON": "there are no reserved field names"
                    }
                }
                ],
                "status": "success",
                "metrics": {
                    "elapsedTime": "9.666997ms",
                    "executionTime": "9.455322ms",
                    "resultCount": 2,
                    "resultSize": 884,
                    "serviceLoad": 1,
                    "mutationCount": 2,
                    "transactionElapsedTime": "7.00233248s",
                    "transactionRemainingTime": "1m52.99764445s"
                }
            }
            cbq> commit;
            {
                "requestID": "ea7a703b-eccb-4483-a0d0-4fc97bdf329c",
                "signature": "json",
                "results": [
                ],
                "status": "success",
                "metrics": {
                    "elapsedTime": "17.891042ms",
                    "executionTime": "17.595757ms",
                    "resultCount": 0,
                    "resultSize": 0,
                    "serviceLoad": 1,
                    "transactionElapsedTime": "11.683255467s"
                }
            } 

            pierre.regazzoni Pierre Regazzoni added a comment - Verified on 7.0.0-4990 cbq> begin work; {     "requestID" : "80edd282-59fb-46f4-a1d1-12c8a3d712e7" ,     "signature" : "json" ,     "results" : [     {         "txid" : "299dc338-2f0f-4a93-85fe-e38d4283b569"     }     ],     "status" : "success" ,     "metrics" : {         "elapsedTime" : "1.464192ms" ,         "executionTime" : "1.294904ms" ,         "resultCount" : 1 ,         "resultSize" : 62 ,         "serviceLoad" : 6 ,         "transactionElapsedTime" : "194.274µs" ,         "transactionRemainingTime" : "1m59.999754753s"     } } cbq> INSERT INTO default : default .`_default`.`_default` (KEY k1, value t) SELECT DISTINCT t.name AS k1,t FROM default : default .`_default`.`_default` t WHERE  job_title= 'Sales' LIMIT 10 RETURNING *; {     "requestID" : "f095f196-ecb8-47f0-a0cd-1b42b0ec6990" ,     "signature" : {         "*" : "*"     },     "results" : [     {         "_default" : {             "click" : "to edit" ,             "job_title" : "Sales" ,             "name" : "James Bond" ,             "with JSON" : "there are no reserved field names"         }     },     {         "_default" : {             "click" : "to edit" ,             "job_title" : "Sales" ,             "name" : "John Doe" ,             "with JSON" : "there are no reserved field names"         }     }     ],     "status" : "success" ,     "metrics" : {         "elapsedTime" : "10.770518ms" ,         "executionTime" : "10.509852ms" ,         "resultCount" : 2 ,         "resultSize" : 398 ,         "serviceLoad" : 1 ,         "mutationCount" : 2 ,         "transactionElapsedTime" : "3.558740496s" ,         "transactionRemainingTime" : "1m56.441234842s"     } } cbq> INSERT INTO default : default .`_default`.`AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ- 3 - 549000 ` (KEY k1, value t) SELECT DISTINCT t.name AS k1,t FROM default : default .`_default`.`AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ- 3 - 549000 ` t WHERE  job_title= 'Sales' LIMIT 10 RETURNING *; {     "requestID" : "94f56024-b69f-451a-a682-b0562ffe20ad" ,     "signature" : {         "*" : "*"     },     "results" : [     {         "AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000" : {             "click" : "to edit" ,             "job_title" : "Sales" ,             "name" : "John Doe" ,             "with JSON" : "there are no reserved field names"         }     },     {         "AeHXBSXvetEKY1K1yCcz7Fu4YS9LgrMoQB9Hvy94jw7O38HWNIL5RS%eN7pK5wNdeu_ipg6lzZkBXqYmKuL%XVUWqS6PDb3j5B39Y2tR25olKNdyxde11ygO%KLZX_bBq2Z1iqUtBZu5SinPbb7Bbz9BRPyUcIQ5Tuo5VBXIf5alnhlAbWyKbyN0h8e0hScS1OPQpZSw%pyHD-6xhQ7bd6PQqaFBmizwupJuZweObwPITNX0AZ-3-549000" : {             "click" : "to edit" ,             "job_title" : "Sales" ,             "name" : "James Bond" ,             "with JSON" : "there are no reserved field names"         }     }     ],     "status" : "success" ,     "metrics" : {         "elapsedTime" : "9.666997ms" ,         "executionTime" : "9.455322ms" ,         "resultCount" : 2 ,         "resultSize" : 884 ,         "serviceLoad" : 1 ,         "mutationCount" : 2 ,         "transactionElapsedTime" : "7.00233248s" ,         "transactionRemainingTime" : "1m52.99764445s"     } } cbq> commit; {     "requestID" : "ea7a703b-eccb-4483-a0d0-4fc97bdf329c" ,     "signature" : "json" ,     "results" : [     ],     "status" : "success" ,     "metrics" : {         "elapsedTime" : "17.891042ms" ,         "executionTime" : "17.595757ms" ,         "resultCount" : 0 ,         "resultSize" : 0 ,         "serviceLoad" : 1 ,         "transactionElapsedTime" : "11.683255467s"     } }

            Build sync_gateway-3.0.0-223 contains gomemcached commit 5e454ee with commit message:
            MB-44807 memcached uses new get_collection_id protocol

            build-team Couchbase Build Team added a comment - Build sync_gateway-3.0.0-223 contains gomemcached commit 5e454ee with commit message: MB-44807 memcached uses new get_collection_id protocol

            People

              pierre.regazzoni Pierre Regazzoni
              anitha.kuberan Anitha Kuberan
              Votes:
              0 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty