Span logger leaks memory in infinite watching server.Find
case
#1085
Labels
bug
Something isn't working
server.Find
case
#1085
Current Behavior
In infinite watching
server.Find
case span logger just collects logs and doesn't push them. It leads to unlimited memory growth in registry server.Issue in code
In infinite case
defer
never happens:sdk/pkg/registry/core/trace/nse_registry.go
Lines 87 to 88 in c7b15ba
pprof
outputregistry-k8s-5b77d84b85-lgxn4.pb.gz
Possible solution
Instead of having single span in such case we can handle such hierarchy:
So all of [child spans] will refer to the single [root span] and will be pushed with some timeout or with some amount of logs collected. [root span] will always be empty so there will be no memory leak.
The text was updated successfully, but these errors were encountered: