[SERVER-31787] Certain aggregation commands with merging on mongos can leak cursors on mongod Created: 01/Nov/17  Updated: 30/Oct/23  Resolved: 07/Nov/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 3.6.0-rc1
Fix Version/s: 3.6.0-rc4

Type: Bug Priority: Critical - P2
Reporter: Nicholas Zolnierz Assignee: Nicholas Zolnierz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-11-13
Participants:
Linked BF Score: 0

 Description   

This was originally found by running the bestbuy aggregation workload against a sharded cluster (see attached BF ticket), but also reproduces with a local setup outside of DSI. The consistently reproducing test case does the following:

1. Setup 3-node sharded cluster with a single mongos
2. Presplit the data according to what is done here
2. Shard the collection and move chunks to ensure each shard has at least one chunk
3. Insert 200 documents (exact number probably doesn't matter) near each split point
4. Run an aggregate command with the following pipeline: [{$match: {type: "Music"}}, {$limit: 100}] in a loop

The cursor leak typically occurs within 30 seconds of starting the test. It's important to note that the issue does not reproduce when setting the parameter internalQueryProhibitMergingOnMongoS, thus indicating that it appears to be a regression related to aggregation's merging on mongos.



 Comments   
Comment by Githook User [ 07/Nov/17 ]

Author:

{'name': 'Nick Zolnierz', 'username': 'nzolnierzmdb', 'email': 'nicholas.zolnierz@mongodb.com'}

Message: SERVER-31787: Certain aggregation commands with merging on mongos can leak cursors on mongod
Branch: master
https://github.com/mongodb/mongo/commit/1d290c584c45a6065c8beeb67d18076753a2d587

Generated at Thu Feb 08 04:28:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.