[CDRIVER-4207] mongoc_topology_scanner_node_t.last_failed ignores errors outside of monitoring for singled-threaded SDAM Created: 29/Oct/21  Updated: 28/Oct/23  Resolved: 17/Dec/21

Status: Closed
Project: C Driver
Component/s: SDAM
Affects Version/s: None
Fix Version/s: 1.20.1

Type: Bug Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PHPLIB-717 Test Serverless behind a load balance... Closed
is depended on by PHPLIB-783 Update load balancer tests to support... Closed
Related
related to PHPC-2071 Upgrade libbson and libmongoc to 1.20.1 Closed
related to DRIVERS-1968 Single-threaded SDAM should construct... Closed

 Description   

Quoting my comment in CLOUDP-104364:

Using my original test case, I can confirm that libmongoc (used by PHP) is not constructing a handshake command after the fail point triggers and the connection is dropped. The relevant logic is in _begin_hello_cmd, where libmongoc only decides to recreate a handshake hello command if the node has not been used before or has experienced an error. The error-tracking is what's being missed here, and it looks like that is only set in _async_error_or_timeout, which is one of the monitoring callbacks.

This seems more like a bug in libmongoc, and is perhaps unique to their single-threaded SDAM implementation where monitoring and application sockets are one and the same. In this case, it looks like an error during application usage is not being properly recorded for the monitoring structure. We only discovered this because it causes the absence of a serviceId in the serverless hello response, but more generally this also means that libmongoc is not constructing a handshake when recreating the single monitoring/application socket for singled-threaded applications.



 Comments   
Comment by Githook User [ 08/Feb/22 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: PHPLIB-783, PHPLIB-784: Update load balancer testing config and CSFLE tests (#887)

Upstream changes in drivers-evergreen-tools now require passing LOAD_BALANCER to run-orchestration.sh. Additionally, service ID mocking is no longer required as of server version 5.1.

Load balancer testing requires PHPC 1.13.x for CDRIVER-4207

  • Remove PHP memory limit for Evergreen
  • PHPLIB-784: Replace example.com in CSFLE prose tests
Comment by Githook User [ 17/Dec/21 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-4207 handshake on new stream in scanner (#915)
Branch: r1.20
https://github.com/mongodb/mongo-c-driver/commit/2c53188905b681c5bf8d2a74faf2e30739dffc3c

Comment by Githook User [ 17/Dec/21 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-4207 handshake on new stream in scanner (#915)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b42543cd15e72cb7dc825b7d6c0cabb6a87af800

Comment by Kevin Albertson [ 17/Dec/21 ]

PR: https://github.com/mongodb/mongo-c-driver/pull/915

Generated at Wed Feb 07 21:20:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.