node-redlock icon indicating copy to clipboard operation
node-redlock copied to clipboard

bug report exploration

Open mike-marcacci opened this issue 2 years ago • 1 comments

This is an exploration of bug reports such as #168, with the goal of reproducing the experienced issues.

mike-marcacci avatar May 24 '22 03:05 mike-marcacci

I experienced a similar issue to what was described in #168 (unexpected "unable to achieve quorum" errors). I captured the error and looked at the attempts field, where I discovered this more specific error message:

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.

If I am understanding the API correctly, in index.ts around line 555, we should be calling

client.evalsha(script.hash, keys.length, ...keys, ...args)

not

client.evalsha(script.hash, keys.length, [...keys, ...args])

but I haven't had an opportunity to test that.

Environment: Nodejs 16.14.0 Redlock 5.0.0-beta.2 Windows 10

carycodes avatar May 25 '22 19:05 carycodes