[CDRIVER-4174] First outgoing command in single-threaded load balancer connection omits $clusterTime Created: 04/Oct/21  Updated: 31/Mar/22

Status: Backlog
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-4171 Single-threaded server selection shou... Backlog

 Description   

Several PHPC tests are failing because the first outgoing command executed no longer includes a $clusterTime field:

I'm curious if this is related to CDRIVER-4171, if we suppose that the initial cluster time would be collected from the hello response at the same time the service ID would be validated. If that's not happening, then perhaps these outgoing commands are being assembled before that hello response has been analyzed (and the cluster time collected).



 Comments   
Comment by Githook User [ 15/Oct/21 ]

Author:

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

Message: PHPC-1752: Fix tests for load balanced topologies

Skip tests expecting gossiped $clusterTime on first command. This may be a bug in libmongoc, per CDRIVER-4174.

Make exception assertion in TLS tests more flexible. Expect parent ConnectionException to accomodate load balanced clients, which do not use server selection. Both exception messages will include a common prefix from libmongoc.

Do not assert exception message for failed TLS connection. While the message will typically include "TLS handshake failed", that is not guaranteed.

Make ping response assertions in TLS tests more flexible. Sharded clusters and replica sets may return additional fields in the ping response (e.g. cluster time). These tests were originally written to expect a standalone response.

Allow unset RTT (-1) for load balanced client.

Note SRV caveat for is_replica_set test function.

Allow load balancers for tests that require sharded clusters. Load balancers should always proxy a mongos, so existing skip functions that check for mongos can now allow a load balancer. If there is some incompatibility specific to LBs, we can address that later with a LB-specific skip function.

Require mongos for pinning tests. Pinning does not apply to load balanced clients, since there is only one connection.
Branch: master
https://github.com/mongodb/mongo-php-driver/commit/ae74c7a1cd8d4addb99e109abb7e1b89730e59ce

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