-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Distributed Query Execution, Sharding
-
None
-
Fully Compatible
-
ALL
-
v6.0
-
-
QO 2022-05-16, QO 2022-05-30, QO 2022-06-13, QO 2022-06-27, QO 2022-07-11, QO 2022-07-25, QO 2022-08-08
When testing with 6.0.0-rc4 in cloud-dev, I ran into a few issues with $searchMeta when run against an unsharded collection & against a sharded collection with all of its docs on a single shard.
When I run a $searchMeta query against a sharded collection, where docs are only present on a single shard, I receive this error:
{"t":{"$date":"2022-05-09T23:20:06.685+00:00"},"s":"I", "c":"QUERY", "id":4625501, "ctx":"conn27","msg":"Unable to establish remote cursors","attr":{"error":{"code":6253102,"codeName":"Location6253102","errmsg":"Must own one of the two arguments if there are documents in the batch"},"nRemotes":0}}
When I run a $searchMeta query against a totally unsharded collection, the mongod running the query crashes. I have attached this log of the mongod that crashed: unsharded_logs.txt(Within this log, I also ran the same $search query and accessed $$SEARCH_META successfully through $project)
In both scenarios, when I use a normal $search query with $project to access $$SEARCH_META, it works correctly.
I've also attached local repros. Cloud-dev is seeing issues with the mongotHost parameter so can't repro there yet.
- is related to
-
SERVER-66037 Use $$SEARCH_META in $unionWith tests in search_sharded_union_with_lookup.js
- Closed
- related to
-
SERVER-65692 Avoid unnecessary cursors for $searchMeta queries
- Closed