aliyun.com redis 4.0 command not UNLINK Is there any good solution?
At present, I do not want to reduce redis version.
But use the lower version.StackExchange.Redis
A large number of anomalies occurred.
ServerLoop 2 0205 閿欒 1 StackExchange.Redis.RedisTimeoutException: Timeout performing SADD rid-20207-3307, inst: 40, queue: 1, qu: 0, qs: 1, qc: 0, wr: 0, wq: 0, in: 0, ar: 0, clientName: WIN-4VKOUF6750T, serverEndpoint: 172.29.0.xxx:6382, keyHashSlot: 12556 (Please take a look at this article for some common client-side issues that can cause timeouts: http://stackexchange.github.io/StackExchange.Redis/Timeouts)
at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImplT in
aliyun.com redis 4.0 command not UNLINK Is there any good solution?
Can you rephrase that? I'm unclear what you mean. The library will choose between DEL and UNLINK based on the detected server version. If UNLINK is unavailable despite being a v4+ server, you can use a custom command-map to tell it that UNLINK should not be used - I can offer further guidance if needed.
aliyun.com redis 4.0 command not UNLINK Is there any good solution?
Can you rephrase that? I'm unclear what you mean. The library will choose between
DELandUNLINKbased on the detected server version. IfUNLINKis unavailable _despite_ being a v4+ server, you can use a custom command-map to tell it thatUNLINKshould not be used - I can offer further guidance if needed.
Thank you. The clustered version of Ali cloud on my side does not support the unlink command. Cause this problem, 2.x version is still very stable. 馃憤
Would you like me to provide an example of explicitly creating a command-map that tells the library to ignore UNLINK even on higher tier server versions?
Would you like me to provide an example of explicitly creating a command-map that tells the library to ignore
UNLINKeven on higher tier server versions?
Good idea. I hope you can give me a case. Thank you.
example using the ConfigurationOptions API:
c#
var config = new ConfigurationOptions
{
EndPoints = { { IPAddress.Loopback, 6379 } },
CommandMap = CommandMap.Create(new HashSet<string> { "unlink" }, false)
};
and the corresponding configuration string value (if you're using the config string API):
127.0.0.1:6379,$UNLINK=
the syntax of the configuration string is - as command separated values:
=, it is a key/value pair, otherwise it is an endpoint127.0.0.1:6379 is an endpoint$, it is a command-map$UNLINK= tells the library that the UNLINK command is disabledexample using the
ConfigurationOptionsAPI:var config = new ConfigurationOptions { EndPoints = { { IPAddress.Loopback, 6379 } }, CommandMap = CommandMap.Create(new HashSet<string> { "unlink" }, false) };and the corresponding configuration string value (if you're using the config string API):
127.0.0.1:6379,$UNLINK=the syntax of the configuration string is - as command separated values:
- if it has an
=, it is a key/value pair, otherwise it is an endpoint- hence
127.0.0.1:6379is an endpoint- for key/value pairs, if the key starts
$, it is a command-map- the right hand side of the key value pair is the mapped command name, or blank for disable
- hence:
$UNLINK=tells the library that theUNLINKcommand is disabled
Okay, I'll try. Thank you.
Most helpful comment
example using the
ConfigurationOptionsAPI:c# var config = new ConfigurationOptions { EndPoints = { { IPAddress.Loopback, 6379 } }, CommandMap = CommandMap.Create(new HashSet<string> { "unlink" }, false) };and the corresponding configuration string value (if you're using the config string API):
the syntax of the configuration string is - as command separated values:
=, it is a key/value pair, otherwise it is an endpoint127.0.0.1:6379is an endpoint$, it is a command-map$UNLINK=tells the library that theUNLINKcommand is disabled