System.ObjectDisposedException: The CancellationTokenSource has been disposed in GlobalEndpointManager
needs-investigationcustomer-reported
**Describe the bug**
Our service which are using Cosmos DB SDK encountered an exception as follows:
System.ObjectDisposedException: The CancellationTokenSource has been disposed. at System.Threading.CancellationTokenSource.Cancel() at Microsoft.Azure.Cosmos.Routing.GlobalEndpointManager.GetAccountPropertiesHelper.GetAndUpdateAccountPropertiesAsync(Uri endpoint) at Microsoft.Azure.Cosmos.Routing.GlobalEndpointManager.GetAccountPropertiesHelper.TryGetAccountPropertiesFromAllLocationsAsync()
This exception has been intermittently happened for quite a while.
**Expected behavior**
Cosmos DB should handle this exception properly.
**Environment summary**
SDK Version: Microsoft.Azure.Cosmos 3.46.1
OS Version: Linux, mcr.microsoft.com/dotnet/runtime:8.0-azurelinux3.0-distroless
2 条评论