Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class RedisConfiguration
private string? configurationChannel;
private string? connectionString;
private string? serviceName;
private bool disableSentinelCommandmapper;
private int? connectRetry;
private SslProtocols? sslProtocols;
private Func<ProfilingSession>? profilingSessionProvider;
Expand Down Expand Up @@ -116,6 +117,20 @@ public string? ServiceName
}
}

/// <summary>
/// Gets or sets the disableSentinelCommandmapper used in case of Sentinel.
/// </summary>
public bool DisableSentinelCommandmapper
{
get => disableSentinelCommandmapper;

set
{
disableSentinelCommandmapper = value;
ResetConfigurationOptions();
}
}

/// <summary>
/// Gets a value indicating whether get a boolean value that indicates if the cluster is configured for sentinel or not
/// </summary>
Expand Down Expand Up @@ -449,7 +464,11 @@ public ConfigurationOptions ConfigurationOptions
if (IsSentinelCluster)
{
newOptions.ServiceName = ServiceName;
newOptions.CommandMap = CommandMap.Sentinel;

if (!DisableSentinelCommandmapper)
newOptions.CommandMap = CommandMap.Sentinel;
else
newOptions.CommandMap = CommandMap.SSDB;
}

foreach (var redisHost in Hosts)
Expand Down