[SERVER-30118] DocumentSourceMergeCursors::doDispose() should not call done() on connections in state between initLazy and initLazyFinish Created: 12/Jul/17  Updated: 30/Oct/23  Resolved: 26/Jul/17

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 3.5.11

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2017-07-31
Participants:

 Description   

https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/document_source_merge_cursors.cpp#L178-L180

This has always been illegal, but at the time it was written, dispose() would get called while in that state. However, calling code has changed such that dispose() is now called if start() throws, by way of ClientCursorPin::deleteUnderlying().



 Comments   
Comment by Githook User [ 26/Jul/17 ]

Author:

{'email': 'mathias@10gen.com', 'username': 'RedBeard0531', 'name': 'Mathias Stearn'}

Message: SERVER-30118 DSMergeCursors only return connections to pool if in clean state

If DSMergeCursors::start() fails part way through either loop, some
connections will be left in a state where a request has been sent but the
reply hasn't been read yet. Throwing at this point will eventually cause
doDispose() to be called, which would previously have returned this cursor to
the connection pool, where a later user could see our reply instead of theirs.
Branch: master
https://github.com/mongodb/mongo/commit/9ff5e02567a22e06ce4cb56faf05365004536b74

Comment by Githook User [ 26/Jul/17 ]

Author:

{'email': 'mathias@10gen.com', 'username': 'RedBeard0531', 'name': 'Mathias Stearn'}

Message: SERVER-30118 always check replyTo field in DBClient
Branch: master
https://github.com/mongodb/mongo/commit/d94b263ca72b874440757259a56bd5676b5ee4a3

Comment by Githook User [ 26/Jul/17 ]

Author:

{'email': 'mathias@10gen.com', 'username': 'RedBeard0531', 'name': 'Mathias Stearn'}

Message: SERVER-30118 Stop setting messageIDs in AbstractMessagingPort::say() and call()

It is now the responsibility of the callers (including the same-named methods
on DBClientConnection) to prepare a ready-to-send Message. AMP's job is now
just to send the provided message as-is.
Branch: master
https://github.com/mongodb/mongo/commit/a405592e179d9bc704c8e6fb7faac22ade77ecdb

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