Skip to content
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

RESP3 Issues #313

Open
oAnubis opened this issue Jan 19, 2023 · 9 comments
Open

RESP3 Issues #313

oAnubis opened this issue Jan 19, 2023 · 9 comments

Comments

@oAnubis
Copy link

oAnubis commented Jan 19, 2023

Possible User Error Sanity Check

If RESP3 is not activated automatically within NewMiniRedis() this is 100% user error and can be closed. Please inform me of how to activate if so.

If Not User Error

Steps To Reproduce

func Test_GetStuffAndThings(t *testing.T) {
     rdb := miniredis.NewMiniRedis()
     miniredis.Start()
     defer t.Cleanup

     FuncSeedDB()
 
     FuncDoStuff()  - This method runs a lua script using a go-redis client setup using "tcp" and rdb.Addr() 

}

Error Encountered

Within FuncCall() I am checking the lua returned interface for a nil value, if so returns "script returned empty handed" and the interface return, which indeed has no values. (I debugging and confirmed)

  • I am able to ping the server and receive a PONG response and no errors, so I ruled out the server not being open.
  • The lua scripts first call is redis.setresp(3)

I also manually checked to see if data available to pull, verified this is this case.

Additional Checks

I have verified my go functions and lua scripts are both functional against a local, VM, and cloud hosted databases, so it is not the code.

@alicebob
Copy link
Owner

Hi @oAnubis,
thanks for your issue. I'll have a proper look soon, but IIRC you need to do a HELLO 3 command to enable RESP3
https://redis.io/commands/hello/

@oAnubis
Copy link
Author

oAnubis commented Jan 19, 2023

Hi @oAnubis, thanks for your issue. I'll have a proper look soon, but IIRC you need to do a HELLO 3 command to enable RESP3 https://redis.io/commands/hello/

Thank you for the prompt reply.

I tried the HELLO 3 command, no changes in outcome.

I ran some more debugging and cross referencing the source code,
I think this may a compatibility with the redis.setresp(3) command inside the lua script. This is where the errors traceback to.

@alicebob
Copy link
Owner

ok, do you maybe have a small reproducing test program?

@alicebob
Copy link
Owner

There's no setresp string in miniredis, so it looks like the function is simply not there. That would explain :)

@oAnubis
Copy link
Author

oAnubis commented Jan 20, 2023

There's no setresp string in miniredis, so it looks like the function is simply not there. That would explain :)

That definitely makes sense! I wonder how difficult that would be to implement

@oAnubis
Copy link
Author

oAnubis commented Jan 20, 2023

Additionally,

The error received back when running Hello 3 is can't parse "%7"

@hotrush
Copy link

hotrush commented Mar 28, 2023

Having the same issue after upgrading redis/go-redis to v9 (where they introduced RESP3)

@Alexfilus
Copy link

Got error after switch to rueidis
error create rueidis unknown subcommand 'TRACKING'. Try CLIENT HELP.: ClientOption.DisableCache must be true for redis not supporting client-side caching or not supporting RESP3

@alicebob
Copy link
Owner

I forgot about this issue, will check soonish. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants