-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Much of the monitoring code I've looked at relies on manual mutex unlocking. This is not generally idiomatic Go (except in hot code paths) and leads to errors, as shown in GODRIVER-74. Until we know there's a performance problem caused by defer, avoiding defer is premature optimization that increases the likelihood of bugs.
We should change all unlocking to use defer when possible. (N.B. For whoever does this work: note that it's not possible inside a for loop, as defer is function scoped, not loop scoped.)