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
Because the configuration on the passed in factory is always nil, the configuration always initializes a new DefaultTelemetryConfiguration which results in a newly allocated pointer. The existence check on the map farther down in that function never finds the same value in the map since the pointer is always different, and allocates a new config in the map. The map grows unbounded.
Expectation
I expect no memory leaks for a valid configuration, or a failure to initialize the client because of an invalid configuration.
Reproduction
Create a client with no telemetry config, make an API call, check a debugger and observe the telemetry map growing unbounded.
SDK Checklist
JS SDK
Go SDK
.NET SDK
Python SDK
Java SDK
OpenFGA SDK version
v0.6.3
OpenFGA version
v.1.5.5
SDK Configuration
Given above
Logs
No response
References
No response
The text was updated successfully, but these errors were encountered:
Checklist
Description
There is a memory leak in the Go SDK that occurs when not specifying any telemetry configuration in the client creation, i.e.
This happens from this function -
Because the configuration on the passed in factory is always nil, the configuration always initializes a new
DefaultTelemetryConfiguration
which results in a newly allocated pointer. The existence check on the map farther down in that function never finds the same value in the map since the pointer is always different, and allocates a new config in the map. The map grows unbounded.Expectation
I expect no memory leaks for a valid configuration, or a failure to initialize the client because of an invalid configuration.
Reproduction
Create a client with no telemetry config, make an API call, check a debugger and observe the telemetry map growing unbounded.
SDK Checklist
OpenFGA SDK version
v0.6.3
OpenFGA version
v.1.5.5
SDK Configuration
Given above
Logs
No response
References
No response
The text was updated successfully, but these errors were encountered: