Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Cheshire-Cat
-
Untriaged
-
Centos 64-bit
-
-
1
-
Unknown
Description
Build: 7.0.0-2261
Cluster of 2 nodes: kv:query:index, kv:query:index
bucket bucket1 contains the following scopes and collections:
bucket1.scope1.collection1
|
bucket1.scope1.collection2
|
Both collections are provided with primary indexes:
CREATE PRIMARY INDEX `#primary` ON `bucket1`.`scope1`.`collection1`
|
CREATE PRIMARY INDEX `#primary` ON `bucket1`.`scope1`.`collection2`
|
Dataset for collection1 is:
[
|
{
|
"collection1": {
|
"name": "default:bucket1.scope1.collection1_name_updated_updated",
|
"val": 1
|
},
|
"id": "default:bucket1.scope1.collection1_id"
|
},
|
{
|
"collection1": {
|
"name": "default:bucket1.scope1.collection1_name2",
|
"val": 2
|
},
|
"id": "default:bucket1.scope1.collection1_id1"
|
}
|
]
|
Dataset for collection2 is:
[
|
{
|
"collection2": {
|
"name": "default:bucket1.scope1.collection2_name_updated",
|
"val": 1
|
},
|
"id": "default:bucket1.scope1.collection2_id"
|
},
|
{
|
"collection2": {
|
"name": "default:bucket1.scope1.collection2_name2",
|
"val": 2
|
},
|
"id": "default:bucket1.scope1.collection2_id1"
|
}
|
]
|
Running query like
select * from default:bucket1.scope1.collection1 |
or
select * from default:bucket1.scope1.collection2 |
produces sometimes correct result set, sometimes empty dataset.
Explain plan for empty (incorrect) dataset:
{
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "PrimaryScan3",
|
"bucket": "bucket1",
|
"index": "#primary",
|
"index_projection": {
|
"primary_key": true
|
},
|
"keyspace": "collection2",
|
"namespace": "default",
|
"scope": "scope1",
|
"using": "gsi"
|
},
|
{
|
"#operator": "Fetch",
|
"bucket": "bucket1",
|
"keyspace": "collection2",
|
"namespace": "default",
|
"scope": "scope1"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "InitialProject",
|
"result_terms": [
|
{
|
"expr": "self",
|
"star": true
|
}
|
]
|
}
|
]
|
}
|
}
|
]
|
}
|
Explain plan for correct result set:
{
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "PrimaryScan3",
|
"bucket": "bucket1",
|
"index": "#primary",
|
"index_projection": {
|
"primary_key": true
|
},
|
"keyspace": "collection2",
|
"namespace": "default",
|
"scope": "scope1",
|
"using": "gsi"
|
},
|
{
|
"#operator": "Fetch",
|
"bucket": "bucket1",
|
"keyspace": "collection2",
|
"namespace": "default",
|
"scope": "scope1"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "InitialProject",
|
"result_terms": [
|
{
|
"expr": "self",
|
"star": true
|
}
|
]
|
}
|
]
|
}
|
}
|
]
|
}
|