You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though using binary data as keys (represented as a "Buffer" in JavaScript) works as expected in non-cluster mode, it breaks when you are running Redis in cluster mode:
TypeError: str.charCodeAt is not a function
at toUTF8Array (/group-sign/server/node_modules/cluster-key-slot/lib/index.js:93:16)
at generate (/group-sign/server/node_modules/cluster-key-slot/lib/index.js:133:14)
at Command.getSlot (/group-sign/server/node_modules/ioredis/lib/command.js:88:19)
at Cluster.sendCommand (/group-sign/server/node_modules/ioredis/lib/cluster/index.js:440:47)
at Cluster.set (/group-sign/server/node_modules/ioredis/lib/commander.js:131:17)
...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 7 days if no further activity occurs, but feel free to re-open a closed issue if needed.
Though using binary data as keys (represented as a "Buffer" in JavaScript) works as expected in non-cluster mode, it breaks when you are running Redis in cluster mode:
Looks like in the call to the the cluster-key-slot library, the key is expected to be a String, not a Buffer:
https://github.com/luin/ioredis/blob/master/lib/command.js#L90
In non-cluster mode, the code is not executed as there is no need to compute the slot. I assume that is why it works there.
(As a workaround, I have switched to Strings for the keys.)
The text was updated successfully, but these errors were encountered: