[SERVER-19232] Properly set error responses in NetworkInterfaceASIO when we fail to get a connection from the pool Created: 30/Jun/15  Updated: 05/Feb/16  Resolved: 02/Jul/15

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.1.5
Fix Version/s: 3.1.6

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform 6 07/17/15
Participants:

 Description   

The bug causing the auth failures is here:

            ResponseStatus status(exceptionToStatus());
            asio::post(_io_service, [this, op, status]() { return _completeOperation(op); });
            return;

We should set the ResponseStatus constructed from the exception as the result of executing the command, but we don't. As a result, we don't hit special logic in TopologyCoordinatorImpl::processHeartbeatResponse that is used for handling authentication failures in heartbeats.



 Comments   
Comment by Githook User [ 02/Jul/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-19232 propagate errors back up the stack in NetworkInterfaceASIO
Branch: master
https://github.com/mongodb/mongo/commit/d8a1e59f5201d9487bce801534b99a814d821a09

Comment by Adam Midvidy [ 30/Jun/15 ]

samantha.ritter@10gen.com, I think the fix here is to make the _output member of AsyncOp a TaskExecutor::ResponseStatus, so we can propagate a non-OK status through the state machine. This will also be needed to support OP_COMMAND metadata, as the output is no longer a single BSONObj. How does that sound?

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