[SERVER-79306] $listLocalSessions with missing database behaves differently on sharded clusters Created: 25/Jul/23 Updated: 28/Nov/23 Resolved: 28/Nov/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ezra Chung | Assignee: | Janna Golden |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Cluster Scalability
|
| Operating System: | ALL |
| Steps To Reproduce: | The script demonstrating the unexpected behavior was run against server topologies setup using the following mlaunch commands:
|
| Sprint: | Cluster Scalability 2023-12-11 |
| Participants: |
| Description |
|
The following script is modeled after this Drivers unified spec test and may be run with mongosh:
For single server topologies and replica set topologies, the $listLocalSessions command behaves as expected and the aggregation pipeline returns the single document with the dummy field. However, for sharded cluster topologies, the cursor unexpectedly returns zero documents. This unexpected behavior requires the database to not exist. If the database already exists, such as when the db.createCollection() command is uncommented, the cursor returns the single document with the dummy field as expected. This unexpected behavior seems to be present since at least server 4.2.0 and is still present in the current release. |