You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: memory leak when profiling is enabled (#5133)
* fix: memory leak when profiling is enabled
fixes: #5113fixes: #4721
* Replaced remaining uses of ConcurrentBag<T>
* Replaced last remaining usage of ConcurrentQueue<T>
* Fixed SqlListener test
This was passing accidentally before because ConcurrentBag typically
followed a LIFO model for adding/removing items.
The SQL listener test had a bug that the LIFO mask would hide. The test
did `OrderByDescending(x => x.StartTimestamp).First()` to get the
"newest" span, but this fails whenever two spans share the same
timestamp — which is common on Windows due to ~15ms clock resolution.
Making ConcurrentBagLite LIFO would make the test pass again
accidentally, because the newer span would happen to enumerate first and
survive the stable sort. But the brittleness is still there — if the
spans ever get equal timestamps in a different order (e.g., a background
thread adds one), the test breaks again.
0 commit comments