-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility between DragonflyDB and redis/rueidis client #2454
Comments
Hi @thisismz, this should be a bug (we support both RESP3 and client side tracking). Let me get back to you on this one |
Hi @thisismz , I run your example with go panic: Unknown subcommand or wrong number of arguments for 'TRACKING'. Try CLIENT HELP.: ClientOption.DisableCache must be true for redis not supporting client-side caching or not supporting RESP3 [recovered] panic: Unknown subcommand or wrong number of arguments for 'TRACKING'. Try CLIENT HELP.: ClientOption.DisableCache must be true for redis not supporting client-side caching or not supporting RESP3 When I run it, I just get: How I reproduced: Therefore to resolve this we need to parse the @romange what's the priority of this? Also, I noticed that we need to update the docs https://www.dragonflydb.io/docs/command-reference/compatibility to include |
Yes, it seems that you are correct; the error appears to be different between Linux and Windows. I executed this on my MacBook and received the same error as you. let me the opportunity to double-check. However, it seems that by adding the following parameter, it appears that the issue has been resolved:
client, err := rueidis.NewClient(
rueidis.ClientOption{
InitAddress: []string{"127.0.0.1:6379"},
DisableCache: true,
}) But when we set a key twice, we receive the following error:
It seems like we might not have overwriting capabilities.
|
Hello @kostasrim I checked again on Windows and got the same error that was reported.
I'm using docker version 4.27.1 and |
Hi @thisismz from a quick look the
You call
You used |
Hi all, rueidis can send package main
import (
"context"
"fmt"
"time"
"github.com/redis/rueidis"
)
func main() {
client, err := rueidis.NewClient(rueidis.ClientOption{
InitAddress: []string{"127.0.0.1:6379"},
ClientTrackingOptions: []string{},
})
if err != nil {
panic(err)
}
defer client.Close()
fmt.Println(client.DoCache(context.Background(), client.B().Get().Key("mykey").Cache(), time.Second).Error())
} However, I found dragonfly would crash on the above I20240313 12:17:42.688308 9 listener_interface.cc:101] sock[7] AcceptServer - listening on port 6379
*** SIGSEGV received at time=1710332266 on cpu 0 ***
PC: @ 0xaaaae1226770 (unknown) dfly::Transaction::Refurbish()
@ 0xaaaae187cc7c 480 absl::lts_20230802::AbslFailureSignalHandler()
@ 0xffffacb3b7a0 4960 (unknown)
@ 0xaaaae12ce164 400 facade::Connection::DispatchOperations::operator()()
E20240313 12:17:46.477110 9 server_family.cc:1532] Subcommand CACHING not supported
@ 0xaaaae12d5164 32 facade::Connection::DispatchFiber()
@ 0xaaaae12d576c 384 boost::context::detail::fiber_entry<>() I used the dragonfly docker image df-v1.15.1-d6703460242ab8aa415a93f32677c5f23b5e6ec8. |
Hi @rueian, I think we do not support |
Hi @kostasrim, Thank you for the prompt reply! I understand that Dragonfly doesn't support the |
Hi @rueian, yes I agree we should not crash, I was commenting about why it would not currently work. Thank you for reporting this, I will take care of this. |
Hi @rueian, turns out there was bigger issue on our side. I fixed it and you should be now getting a proper error message |
Wow, thanks! That's amazing. I can't believe you fix this so fast. |
I think this issue should open until CLIENT TRACKING is implemented. |
@joeky888 it's gonna be fixed in 1.20.0 |
@romange I can confirm it is working on my macbook! Thanks for informing me. |
@joeky888 💯 🕺 |
This is the most related issue I was able to find. Based on https://www.dragonflydb.io/docs/command-reference/compatibility I was unable to identify the status of this feature. Is there any open issue or a webpage to track the progress about Client-side caching support? MRE (tested on DragonflyDB v1.26.1 and import redis
from redis.cache import CacheConfig
r = redis.Redis(host='localhost', port=6379, protocol=3, cache_config=CacheConfig())
r.ping() Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/commands/core.py", line 1212, in ping
return self.execute_command("PING", **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/client.py", line 559, in execute_command
return self._execute_command(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/client.py", line 565, in _execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/connection.py", line 1422, in get_connection
connection.connect()
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/connection.py", line 791, in connect
raise ConnectionError(
redis.exceptions.ConnectionError: To maximize compatibility with all Redis products, client-side caching is supported by Redis 7.4 or later
>>> r.ping()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/commands/core.py", line 1212, in ping
return self.execute_command("PING", **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/client.py", line 559, in execute_command
return self._execute_command(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/client.py", line 565, in _execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/connection.py", line 1422, in get_connection
connection.connect()
File "/opt/pysetup/.venv/lib/python3.12/site-packages/redis/connection.py", line 791, in connect
raise ConnectionError(
redis.exceptions.ConnectionError: To maximize compatibility with all Redis products, client-side caching is supported by Redis 7.4 or later |
Hi @alessio-locatelli we do support client side caching. I will take a look and ping |
Hi @alessio-locatelli, the library polls for |
Fixed in #4474 |
RESP3 support missing for rueidis DragonflyDB connection?
Error when connecting to DragonflyDB with rueidis client
When trying to connect to a DragonflyDB instance using the rueidis Redis client library in Go, I get the following panic:
panic: Unknown subcommand or wrong number of arguments for 'TRACKING'. Try CLIENT HELP.: ClientOption.DisableCache must be true for redis not supporting client-side caching or not supporting RESP3 [recovered] panic: Unknown subcommand or wrong number of arguments for 'TRACKING'. Try CLIENT HELP.: ClientOption.DisableCache must be true for redis not supporting client-side caching or not supporting RESP3
This happens with the following code:
It seems there may be an incompatibility between DragonflyDB and the rueidis client assumptions. Specifically the error suggests rueidis expects disabled client caching or RESP3 support.
I checked the DragonflyDB docs but didn't see mention of RESP3 support or client caching handling.
Could this be added to enable better compatibility with Redis clients like rueidis? Or is there another recommended approach for connecting to DragonflyDB from Go code?
Let me know if any other details would be helpful in resolving this. Thanks!
Feel free to modify or improve this as needed. Hopefully it clearly explains the issue you are seeing. Let me know if you have any other questions!
The text was updated successfully, but these errors were encountered: