Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,33 @@ private static void SetTransportAddressUrisToUnhealthy(
}
}
}
// Overloaded method, the previous Lazy<HashSet<TransportAddressUri>> will be removed in a future release
// Once this is merged to master, we will cherry-pick the v3 master commit to OSS and create a new OSS release to use the OSS commit in the msdata PR to unblock the build failures from OSS.
private static void SetTransportAddressUrisToUnhealthy(
PartitionAddressInformation stalePartitionAddressInformation,
Lazy<ConcurrentDictionary<TransportAddressUri, bool>> failedEndpoints)
Comment thread
FabianMeiswinkel marked this conversation as resolved.
{
if (stalePartitionAddressInformation == null ||
failedEndpoints == null ||
!failedEndpoints.IsValueCreated)
{
return;
}

IReadOnlyList<TransportAddressUri> perProtocolPartitionAddressInformation = stalePartitionAddressInformation.Get(Protocol.Tcp)?.ReplicaTransportAddressUris;
if (perProtocolPartitionAddressInformation == null)
{
return;
}

foreach (TransportAddressUri failed in perProtocolPartitionAddressInformation)
{
if (failedEndpoints.Value.ContainsKey(failed))
{
failed.SetUnhealthy();
}
}
}

private static void LogPartitionCacheRefresh(
IClientSideRequestStatistics clientSideRequestStatistics,
Expand Down
Loading