Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Code changes to fix preview build failures.
  • Loading branch information
kundadebdatta committed Jul 10, 2023
commit 697d7bfa3078f51354453232381f6a707df1cf84
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public Func<HttpClient> HttpClientFactory
/// <value>
/// The default value for this parameter is false.
/// </value>
public bool EnableAdvancedReplicaSelectionForTcp
public bool? EnableAdvancedReplicaSelectionForTcp
{
get;
set;
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ internal virtual ConnectionPolicy GetConnectionPolicy(int clientId)
EnablePartitionLevelFailover = this.EnablePartitionLevelFailover,
PortReuseMode = this.portReuseMode,
EnableTcpConnectionEndpointRediscovery = this.EnableTcpConnectionEndpointRediscovery,
EnableAdvancedReplicaSelectionForTcp = this.EnableAdvancedReplicaSelectionForTcp.HasValue && this.EnableAdvancedReplicaSelectionForTcp.Value,
EnableAdvancedReplicaSelectionForTcp = this.EnableAdvancedReplicaSelectionForTcp,
HttpClientFactory = this.httpClientFactory,
ServerCertificateCustomValidationCallback = this.ServerCertificateCustomValidationCallback
};
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public static bool IsReplicaAddressValidationEnabled(
replicaValidationDefaultValue = true;
#endif
if (connectionPolicy != null
Comment thread
kundadebdatta marked this conversation as resolved.
&& connectionPolicy.EnableAdvancedReplicaSelectionForTcp)
&& connectionPolicy.EnableAdvancedReplicaSelectionForTcp.HasValue)
{
return true;
return connectionPolicy.EnableAdvancedReplicaSelectionForTcp.Value;
}

return ConfigurationManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,28 @@ public async Task TestGoneFromServiceScenarioAsync(
cRid,
out IReadOnlyList<string> partitionKeyRanges);

List<string> replicaIds1 = new List<string>()
{
"11111111111111111",
"22222222222222222",
"33333333333333333",
"44444444444444444",
};

HttpResponseMessage replicaSet1 = MockSetupsHelper.CreateAddresses(
replicaIds1,
partitionKeyRanges.First(),
"eastus",
cRid);
List<string> replicaIds1 = new List<string>()
{
"11111111111111111",
"22222222222222222",
"33333333333333333",
"44444444444444444",
};

// One replica changed on the refresh
List<string> replicaIds2 = new List<string>()
{
"11111111111111111",
"22222222222222222",
"33333333333333333",
"55555555555555555",
};
HttpResponseMessage replicaSet1 = MockSetupsHelper.CreateAddresses(
replicaIds1,
partitionKeyRanges.First(),
"eastus",
cRid);

// One replica changed on the refresh
List<string> replicaIds2 = new List<string>()
{
"11111111111111111",
"22222222222222222",
"33333333333333333",
"55555555555555555",
};

HttpResponseMessage replicaSet2 = MockSetupsHelper.CreateAddresses(
replicaIds2,
Expand Down