Stackexchange.redis: aliyun.com redis 4.0 command not UNLINK Is there any good solution?

Created on 19 Nov 2018  路  6Comments  路  Source: StackExchange/StackExchange.Redis

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

Most helpful comment

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:

  • if it has an =, it is a key/value pair, otherwise it is an endpoint
  • hence 127.0.0.1:6379 is 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 the UNLINK command is disabled

All 6 comments

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 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.

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 UNLINK even 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:

  • if it has an =, it is a key/value pair, otherwise it is an endpoint
  • hence 127.0.0.1:6379 is 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 the UNLINK command is disabled

example using the ConfigurationOptions API:

        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:6379 is 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 the UNLINK command is disabled

Okay, I'll try. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tw-bert picture tw-bert  路  103Comments

shvez picture shvez  路  63Comments

mcolussi picture mcolussi  路  50Comments

seriouz picture seriouz  路  22Comments

ctlajoie picture ctlajoie  路  49Comments