[KAFKA-370] Fix resource management in MongoSourceTask, MongoSinkTask Created: 12/May/23 Updated: 28/Oct/23 Resolved: 17/May/23 |
|
| Status: | Closed |
| Project: | Kafka Connector |
| Component/s: | Source |
| Affects Version/s: | 1.9.0 |
| Fix Version/s: | 1.10.1 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Valentin Kavalenka | Assignee: | Valentin Kavalenka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Documentation Changes: | Needed | ||||||||||||||||||||||||
| Documentation Changes Summary: | We need to mention in What's new that we fixed a bug that caused resource leak if source/sink tasks fail to start. |
||||||||||||||||||||||||
| Description |
|
Refactoring I did in the source connector 1.9.0 introduced a resource leak: if MongoSourceTask.start fails, then neither StatisticsManager, nor MongoCopyDataManager, nor, most importantly, MongoClient get closed. Not only this causes the leak on the connector-side, but also on the server-side, as MongoClient keeps maintaining/re-creating monitoring connections (at the very least) with the server. |
| Comments |
| Comment by Githook User [ 17/May/23 ] |
|
Author: {'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}Message: Fix resource management in `MongoSourceTask`, `MongoSinkTask` (#138)
|
| Comment by Githook User [ 17/May/23 ] |
|
Author: {'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}Message: Fix resource management in `MongoSourceTask`, `MongoSinkTask` (#138)
|