[SERVER-29074] NetworkInterfaceASIO _asyncRunCommand should not use _request field Created: 04/May/17  Updated: 30/Oct/23  Resolved: 25/Oct/17

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: 3.6.0-rc2

Type: Bug Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2017-05-08, Platforms 2017-05-29, Platforms 2017-09-11, Platforms 2017-10-02, Platforms 2017-10-23, Platforms 2017-11-13
Participants:
Linked BF Score: 19

 Description   

The `_request` field on an AsyncOp represents an overarching user request being run through NetworkInterfaceASIO. We may call _asyncRunCommand many times within that one user request. The underlying _request field should not change for each "mini request" run through _asyncRunCommand. By accessing this field within that method we will log incorrect/misleading things about what command we are running.

For example, when we refresh connections, we re-use part of the NetworkInterfaceASIO state machine. When we are refreshing connections, we do not set the _request field, which leads to confusing log messages with default information:

"Failed to heartbeat to :27017 - HostUnreachable: An established connection was aborted by the software in your host machine."

Note that this log line is from a cluster that did not have a member running on localhost:27017, and had never before connected to a host at :27017.

This extends to any code that we might flow through from _asyncRunCommand before returning from running the command, such as _validateAndRun and associated paths.



 Comments   
Comment by Githook User [ 25/Oct/17 ]

Author:

{'email': 'adam.martin@10gen.com', 'name': 'ADAM David Alan Martin', 'username': 'adamlsd'}

Message: SERVER-29074 Avoid `AsyncOp::_request` in log text.

The `AsyncOp::_request` member is not always accurate, due to the
way that `NetworkInterfaceASIO` works. The member should not
be used in the generation of log message text – the results
are incorrect and often misleading.
Branch: master
https://github.com/mongodb/mongo/commit/840ab4cdcbf9129ad59eb68f39e1cbded623fd0b

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