[JAVA-3734] Reactive KeyManagementService doesn't free resources Created: 16/May/20  Updated: 28/Oct/23  Resolved: 22/May/20

Status: Closed
Project: Java Driver
Component/s: Reactive Streams
Affects Version/s: None
Fix Version/s: 3.12.5, 4.0.4

Type: Bug Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

com.mongodb.internal.async.client.KeyManagementService constructs a {{ TlsChannelStreamFactoryFactory}} but never closes it. This class is expensive because every instance starts a thread (or maybe two). It slows down our tests a lot because every FLE spec test creates one of these, so by the end there are hundreds.

This can be fixed by making it Closeable and calling close from Crypt.close().

At the same time we should update com.mongodb.reactivestreams.client.ClientSideEncryptionTest and org.mongodb.scala.ClientSideEncryptionTest to close the MongoClient instance they own.



 Comments   
Comment by Githook User [ 22/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Clean up TLS Socket Factory in key management service

JAVA-3734
Branch: 3.12.x
https://github.com/mongodb/mongo-java-driver/commit/9810ce4dcc8cdcf6a262e3e3d89e57b8b29eb07b

Comment by Githook User [ 22/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Clean up TLS Socket Factory in key management service

JAVA-3734
Branch: 4.0.x
https://github.com/mongodb/mongo-java-driver/commit/7034d65cf09b5aae75a461851ba9a616ca022ae0

Comment by Githook User [ 22/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Clean up TLS Socket Factory in key management service

JAVA-3734
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c8134f3380f124b64e277918a3350c6dcac2769f

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