[GODRIVER-432] topology.SelectServer leaks timers Created: 26/May/18  Updated: 28/Oct/23  Resolved: 31/May/18

Status: Closed
Project: Go Driver
Component/s: Server Discovery and Monitoring
Affects Version/s: 0.0.5
Fix Version/s: 0.0.6

Type: Bug Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GODRIVER-431 Memory leak in InsertMany? Closed

 Description   

We use a timer during server selection and we create a new one each time we do server selection. Since we never stop these timers, they are never properly shutdown and components of them cannot be garbage collected. Tt fix this, add a defer to stop the timer after we create it.



 Comments   
Comment by Githook User [ 29/May/18 ]

Author:

{'username': 'skriptble', 'name': 'Kris Brandow', 'email': 'kris@mongodb.com'}

Message: Prevent leak of timer subcomponents

GODRIVER-432

Change-Id: Id3a0e921c937215b229a4c807373027695bad68c
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/f826ab8f9f733307f28ea92b803c603c9991e43d

Comment by Kristofer Brandow (Inactive) [ 26/May/18 ]

Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/412579.

Comment by Kristofer Brandow (Inactive) [ 26/May/18 ]

Found while debugging GODRIVER-431.

Generated at Thu Feb 08 08:34:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.