[JAVA-5158] Make NettyStreamFactoryFactory implement AutoCloseable Created: 12/Sep/23 Updated: 05/Dec/23 Resolved: 14/Nov/23 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Internal |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Quarter: | FY24Q4 | ||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Documentation Changes: | Not Needed | ||||||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||||||
| Description |
|
By default NettyStreamFactoryFactory creates an NioEventLoopGroup instance and does not close it when the MongoClient closes. We should change the behavior so that it does. We can follow the pattern from TlsChannelStreamFactoryFactory and make it Closeable, and pass it as an externalResourceCloser to the MongoClient implementation. Since Netty can technically be used even for sync client, this same pattern needs to be applied there as well. |
| Comments |
| Comment by Githook User [ 05/Dec/23 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Make NettyStreamFactoryFactory implement AutoCloseable (#1244) Since StreamFactoryFactory is now internal, just made that interface
|