[COMPASS-7034] Investigate changes in NODE-5228: ConnectionPoolCreatedEvent is not spec compliant as it contains the entire MongoClientOptions instance Created: 20/Jul/23  Updated: 17/Aug/23  Resolved: 17/Aug/23

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: PM Bot Assignee: Unassigned
Resolution: Done Votes: 0
Labels: node-driver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on NODE-5228 ConnectionPoolCreatedEvent is not spe... Closed
Epic Link: MONGOSH-1319
Documentation Changes: Not Needed
Sprint: Iteration Iguanodon

 Description   

Per the CMAP Specification, when a PoolCreatedEvent is sent it should only contain any non-default pool options:

/**
 *  Emitted when a Connection Pool is created
 */
interface PoolCreatedEvent {
  /**
   *  The ServerAddress of the Endpoint the pool is attempting to connect to.
   */
  address: string;
 
  /**
   *  Any non-default pool options that were set on this Connection Pool.
   */
  options: {...}
}

AC

Implementation Requirements

  • Change ConnectionPoolCreatedEvent constructor to pick the following fields from the ConnectionPoolOptions
    • maxPoolSize
    • minPoolSize
    • maxIdleTileMS
    • maxConnecting
    • waitQueueTimeoutMS
  • Check whether or not the Unified Test Runner has extra logic that allowed it pass with the additional fields present. If this is the case, remove this extra logic 

Testing Requirements

  • Add integration test that checks that we only get the fields listed in the implementation requirements when a ConnectionPoolCreatedEvent is emitted by the client
  • Add a unit test that checks that we only pick the fields listed in the implementation requirements when a ConnectionPoolCreatedEvent is constructed.


 Comments   
Comment by Anna Henningsen [ 17/Aug/23 ]

No impact.

Generated at Wed Feb 07 22:45:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.