[GODRIVER-932] Update topology.Server type Created: 04/Apr/19  Updated: 28/Oct/23  Resolved: 02/May/19

Status: Closed
Project: Go Driver
Component/s: Core API
Affects Version/s: None
Fix Version/s: 1.1.0

Type: New Feature Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Kristofer Brandow (Inactive)
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 GODRIVER-628 Connections survive primary stepdown Closed
is depended on by GODRIVER-755 Add background goroutine per server t... Closed
Gantt Dependency
has to be done before GODRIVER-928 Update topology.Topology type Closed
has to be done after GODRIVER-929 Create topology.pool type Closed
has to be done after GODRIVER-930 Implement base driver.Connection type Closed
Epic Link: Core API

 Description   

The topology.Server type will require the following changes:

  • Remove the context.Context argument from Connect, since it's not actually used
  • Move the topo parameter from the NewServer method to the Connect method
    • This is necessary because Disconnect sets this to nil. If we can't reset it then a Server can no longer be connected usefully after it is disconnected
  • Rename Connection to ConnectionLegacy
  • Add a new method Connection that implements the Connection method of the driver.Server interface
  • Make Server implement driver.ErrorProcessor to handle SDAM errors.
  • Update Server to use topology.pool and return topology.Connection from Server.Connection and topology.connectionLegacy from Server.ConnectionLegacy.
  • Implement a semaphore for max connections.
    • This used to be contained in the connection.Pool implementation, but it's simpler to have the topology.Server type track this now that the pool is a private type within the topology package.


 Comments   
Comment by Githook User [ 02/May/19 ]

Author:

{'name': 'Kris Brandow', 'username': 'skriptble', 'email': 'kris@mongodb.com'}

Message: Update topology.Server type

GODRIVER-932

Change-Id: I1234c66952cde375a272052f87f9753ab14e7706
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/8748f69dc04ca3ba3757273fb923c4ff14f12f58

Comment by Kristofer Brandow (Inactive) [ 18/Apr/19 ]

Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/451187.

Generated at Thu Feb 08 08:35:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.