[SERVER-78848] $listSearchIndexes behavior should be consistent with other aggregations when the collection does not exist Created: 10/Jul/23  Updated: 29/Oct/23  Resolved: 30/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.10, 7.2.0-rc0, 7.0.2, 7.1.0-rc1

Type: Bug Priority: Major - P3
Reporter: Evan Plotkin Assignee: Alyssa Clark
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by CSHARP-4736 Enable Atlas Search Index management ... Blocked
Problem/Incident
causes CSHARP-4755 Disable Atlas Search Index management... Closed
Related
is related to CSHARP-4736 Enable Atlas Search Index management ... Blocked
Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0, v6.0
Sprint: QI 2023-08-07, QI 2023-08-21, QI 2023-09-04
Participants:

 Description   

Currently, when the collection does not exist, `$listSearchIndexes` returns a cursor and, when getMore is called on that cursor, a `NamespaceResolution` exception is thrown.

This does not match how the aggregation pipeline works for other stages.  With a `$group` stage, for example, getMore returns an empty cursor in this case, rather than throwing a `NamespaceResolution` exception.

Example with `$listSearchIndexes`:

Aggregate call:
 
Command: {"aggregate": "slava-test-collection", "pipeline": [{"$listSearchIndexes": {}}], "cursor": {"batchSize": 0}, "$db": "slava-test", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1689011240, "i": 1}}, "signature": {"hash": {"$binary": {"base64": "UbqmSAzjXtJNn8TiKdCv/NBV/SA=", "subType": "00"}}, "keyId": 7253089058631450627}}, "lsid": {"id": {"$binary": {"base64": "yj+/sud8QdKifNmSLv6fDg==", "subType": "04"}}}}
 
Command reply: {"cursor": {"firstBatch": [], "id": 5529230180027818871, "ns": "slava-test.slava-test-collection"}, "ok": 1.0
 
Cursor getMore call:
 
Command: {"getMore": 5529230180027818871, "collection": "slava-test-collection", "$db": "slava-test",
{"ok": 0.0, "errmsg": "Executor error during getMore :: caused by :: Collection 'slava-test.slava-test-collection' does not exist.", "code": 26, "codeName": "NamespaceNotFound"}}

 



 Comments   
Comment by Boris Dogadov [ 16/Oct/23 ]

Thanks ted.tuckman@mongodb.com , following up in  SERVER-81055.

Comment by Evan Plotkin [ 15/Aug/23 ]

As a note, we would like to backport any fix for this to 6.0.8+ if possible.

Generated at Thu Feb 08 06:39:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.