[SERVER-84624] Circular dependency between the libraries for Client and transport::Session Created: 08/Jan/24  Updated: 16/Jan/24

Status: Investigating
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Amirsaman Memaripour
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Operating System: ALL
Participants:

 Description   

The Client class is part of the service context/service/client/op context hierarchy of process-related concepts and they are all decorable. The Client class also owns a transport::Session object, which implemented in a separate library and that library depends on ServiceContext.

This makes the library dependency between service_context and transport_layer_common circular, which requires the introduction of unnecessary references to executables that don't even care about either of these two libraries, such as this one.

This ticket is to find a way to decouple this circular dependency. IMO it could be done in one of two ways:

  1. (Most desirable) Pull the transport::Session into a decoration of Client as opposed to ownership
  2. (Undesirable as it just adds more complexity to our component graph) Pull the ServiceContext into a separate library and make Client and transport::Session both depend on it (this should only be done if there is absolutely no other way)

Generated at Thu Feb 08 06:55:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.