Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Cheshire-Cat
-
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