[JAVA-5242] Close StreamFactoryFactory when closing sync MongoClient similarly to how its done via reactive MongoClientImpl.externalResourceCloser Created: 14/Nov/23  Updated: 20/Nov/23

Status: Backlog
Project: Java Driver
Component/s: Connection Management
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Valentin Kavalenka 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 JAVA-5158 Make NettyStreamFactoryFactory implem... Closed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

The driver uses NettyStreamFactoryFactory if NettyTransportSettings is specified regardless of whether the sync or reactive API is used. Currently, only the reactive MongoClient closes NettyStreamFactoryFactory, which means that NettyStreamFactoryFactory.eventLoopGroup leaks if NettyTransportSettings is specified and the sync MongoClient is used. There seem to be reasons for specifying NettyTransportSettings when using the sync API, which means we should also close NettyStreamFactoryFactory via the sync MongoClient.


Generated at Thu Feb 08 09:04:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.