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

autoPipelining true causes "All keys in the pipeline should belong to the same slots allocation group" #1264

Closed
mohantaylor opened this issue Dec 18, 2020 · 2 comments · Fixed by #1391

Comments

@mohantaylor
Copy link

Doing some testing with autoPipelining turned on on a cluster with 3 master nodes 3 slaves, we're seeing the error All keys in the pipeline should belong to the same slots allocation group being thrown. As far as I can see the slots cache is successfully refreshed and the shards are well balanced. Any ideas or thoughts?

Thanks for your help!
Mo

@Paul-Isache
Copy link

Paul-Isache commented Feb 12, 2021

Checked on latest version of ioredis, 4.22.0 down to 4.19.0, with 3 master and 3 slaves, and I am not able to reproduce it.

Are you still able to reproduce it? If so can you provide additional information like the package version.

kemmerer pushed a commit to kemmerer/ioredis that referenced this issue Apr 13, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

This may fix redis#1264 and redis#1248.
TysonAndre pushed a commit to TysonAndre/ioredis that referenced this issue Jul 27, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Amended version of https://github.com/luin/ioredis/pull/1335/files

This may fix redis#1264 and redis#1248.
TysonAndre pushed a commit to TysonAndre/ioredis that referenced this issue Jul 27, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Amended version of https://github.com/luin/ioredis/pull/1335/files

This may fix redis#1264 and redis#1248.
TysonAndre added a commit to TysonAndre/ioredis that referenced this issue Jul 28, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

This may fix redis#1264 and redis#1248.
TysonAndre added a commit to TysonAndre/ioredis that referenced this issue Jul 28, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

This may fix redis#1264 and redis#1248.
TysonAndre added a commit to TysonAndre/ioredis that referenced this issue Jul 28, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

This may fix redis#1264 and redis#1248.
TysonAndre added a commit to TysonAndre/ioredis that referenced this issue Jul 28, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

This may fix redis#1264 and redis#1248.
TysonAndre added a commit to TysonAndre/ioredis that referenced this issue Jul 28, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

This may fix redis#1264 and redis#1248.
TysonAndre added a commit to TysonAndre/ioredis that referenced this issue Jul 28, 2021
Previously the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Similarly, `args[0]` can be a (possibly empty) array which the Command
constructor would flatten. Properly compute the first flattened key when
autopipelining for a Redis.Cluster instance.

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

This may fix redis#1264 and redis#1248.
TysonAndre added a commit to TysonAndre/ioredis that referenced this issue Jul 31, 2021
Previously, the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Similarly, `args[0]` can be a (possibly empty) array which the Command
constructor would flatten. Properly compute the first flattened key when
autopipelining for a Redis.Cluster instance.

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

This may fix redis#1264 and redis#1248.

Fixes redis#1392
TysonAndre added a commit to TysonAndre/ioredis that referenced this issue Jul 31, 2021
Previously, the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Similarly, `args[0]` can be a (possibly empty) array which the Command
constructor would flatten. Properly compute the first flattened key when
autopipelining for a Redis.Cluster instance.

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

This may fix redis#1264 and redis#1248.

Fixes redis#1392
@luin luin closed this as completed in #1391 Aug 1, 2021
luin pushed a commit that referenced this issue Aug 1, 2021
Previously, the building of pipelines ignored the key prefix.
It was possible that two keys, foo and bar, might be set into
the same pipeline. However, after being prefixed by a configured
"keyPrefix" value, they may no longer belong to the same
pipeline.

This led to the error:
"All keys in the pipeline should belong to the same slots
allocation group"

Similarly, `args[0]` can be a (possibly empty) array which the Command
constructor would flatten. Properly compute the first flattened key when
autopipelining for a Redis.Cluster instance.

Amended version of https://github.com/luin/ioredis/pull/1335/files - see comments on that PR

Closes #1264
Closes #1248
Fixes #1392
ioredis-robot pushed a commit that referenced this issue Aug 1, 2021
## [4.27.7](v4.27.6...v4.27.7) (2021-08-01)

### Bug Fixes

* **cluster:** fix autopipeline with keyPrefix or arg array ([#1391](#1391)) ([d7477aa](d7477aa)), closes [#1264](#1264) [#1248](#1248) [#1392](#1392)
@ioredis-robot
Copy link
Collaborator

🎉 This issue has been resolved in version 4.27.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this issue Mar 1, 2024
## [4.27.7](redis/ioredis@v4.27.6...v4.27.7) (2021-08-01)

### Bug Fixes

* **cluster:** fix autopipeline with keyPrefix or arg array ([#1391](redis/ioredis#1391)) ([d7477aa](redis/ioredis@d7477aa)), closes [#1264](redis/ioredis#1264) [#1248](redis/ioredis#1248) [#1392](redis/ioredis#1392)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants