The server does not yet support returning the serviceId field. For now we are using the topologyVersion.processId in its place:
doc = <run connection handshake> # PYTHON-2712 will remove this topologyVersion fallback logic. if self.opts.load_balanced and _MOCK_SERVICE_ID: process_id = doc.get('topologyVersion', {}).get('processId') doc.setdefault('serviceId', process_id)
We should remove this fallback logic and the internal test-only _MOCK_SERVICE_ID once the server implements the serviceId field.
- depends on
-
SERVER-58502 Change the hello command on mongos to handle requests with the loadBalanced flag
- Closed
- duplicates
-
PYTHON-3088 Update load balancer tests to support dedicated load balancer port
- Closed
- related to
-
PYTHON-2542 Load Balancer Support
- Released
-
DRIVERS-1848 Update Tests to Adopt Mongos Load Balancer Support
- Development Complete