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

Support for 'redis' client #163

Open
gregmartyn opened this issue Mar 30, 2022 · 4 comments
Open

Support for 'redis' client #163

gregmartyn opened this issue Mar 30, 2022 · 4 comments

Comments

@gregmartyn
Copy link

It looks like support for 'redis' was dropped from v5 in favor of exclusively supporting 'ioredis'. Is that something that might come back in the future?

Also: Is there an upgrading guide?

Here's what happens when trying to use redlock with redis from the 'redis' package (v3, provided by cache-manager-redis-store) instead of 'ioredis':

node_redis: The EVALSHA command contains a invalid argument type.
Only strings, dates and buffers are accepted. Please update your code to use valid argument types.
    at RedisClient.internal_send_command (/var/www/html/node_modules/cache-manager-redis-store/node_modules/redis/index.js:835:39)
    at RedisClient.evalsha (/var/www/html/node_modules/cache-manager-redis-store/node_modules/redis/lib/commands.js:46:25)
    at Redlock._attemptOperationOnClient (/var/www/html/node_modules/redlock/src/index.ts:555:41)
    at /var/www/html/node_modules/redlock/src/index.ts:482:16
    at new Promise (<anonymous>)
    at Redlock._attemptOperation (/var/www/html/node_modules/redlock/src/index.ts:478:18)
    at Redlock._execute (/var/www/html/node_modules/redlock/src/index.ts:439:42)
    at Redlock.acquire (/var/www/html/node_modules/redlock/src/index.ts:309:39)
    at Redlock.using (/var/www/html/node_modules/redlock/src/index.ts:738:27)
    at backgroundMutex (webpack-internal:///./src/server/complex-routes/session-cache/CustomerCache.js:323:21)
@SimenB
Copy link

SimenB commented Apr 5, 2022

I asked in #84 (comment) as well. Supporting the closest thing to an official node client seems sensible. v4 can probably work in legacyMode: true (connect-redis does)

@DoobleD
Copy link

DoobleD commented Jun 7, 2023

Also intersted to know if we could get support for redis back.

@you-fail-me
Copy link

you-fail-me commented Oct 6, 2023

Interested in this as well. Do we have any explanation / improvement plan with regards to hardwiring to ioredis? Also, if v5 just doesn't work with it, from your experience, can I just use v4 and redis client and it would work reliably?

@nhuanhoangduc
Copy link

nhuanhoangduc commented Sep 1, 2024

I migrated from ioredis to redis.
Github repo: https://github.com/nhuanhoangduc/node-redlock-v5
Npm: https://www.npmjs.com/package/@hoangducnhuan/redlock

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

5 participants