-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 5.0.0
-
Component/s: None
-
None
-
None
-
Java Drivers
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
When creating a MongoClient with NettyTransportSettings where the eventLoopGroup is created by default in the driver, closing the client does not properly shut down the event loop threads, causing the application to hang.
Steps to Reproduce:
//Create a MongoClient using NettyTransportSettings: MongoClient mongoClient = MongoClients.create(MongoClientSettings.builder() .transportSettings(TransportSettings.nettyBuilder().build()) .build()); //Perfrorm any IO operation mongoClient.getDatabase("test").getCollection("test").find().forEach(System.out::println); //Close the client mongoClient.close();
Expected Behavior:
- The synchronous/legacy MongoClient.close() call should shut down any event loop threads created by the driver when the eventLoopGroup was not explicitly provided.
Actual Behavior:
- The application hangs because the event loop threads remain active after closing the client.
- is depended on by
-
JAVA-5813 Enable Spec Performance Tests for Netty Provider
-
- In Code Review
-