-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Chaining custom commands in cluster mode #536
Comments
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. |
@luin please, could you be so kind to share any insight you have in this issue? |
Sorry for the late response. That's not a limitation of Redis. It's just not easy to support chaining custom commands in the cluster setup: ioredis always try In the cluster setup, the nodes may change (e.g. failover happens) during the process of loading scripts, so it's hard to make sure that the scripts are loaded to the correct redis node. That's why this feature haven't been implemented. |
thanks for the throughout explanation. When calling |
@manast Script cache may be cleared by the |
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. |
Bump! :) |
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. |
Bump |
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. |
Bump! |
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. |
Bump |
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. |
Bump because it is an important issue! |
Bump - interested in it as well. |
Bump because we are using more Redis clusters in recent projects. This problem is getting more serious. |
Also running into this. |
we have the same issue. |
Any updates on this issue? @luin Thx. |
@luin wondering if we could always send |
Same issue here |
same issue here |
1 similar comment
same issue here |
Any updates on this issue? @luin |
Hi @luin , are there any plans for this issue to be fixed or is it a lost cause? |
Hi @luin , any plans about adding this ? |
Affects the following scripts: - moveToDelayed - moveToFinished - retryJob Allows for the `attemptsMade`, `stacktrace` and `message` fields to be updated through Lua scripts, rather than requiring a separate operation (or multiple operations) to set these fields. With the possibility of setting these fields within the context of a single script, we avoid the need to craft a transaction containing both HMSET and EVAL(SHA) commands to achieve atomicity. By shedding the need for a transaction, we are able to avoid redis/ioredis#536 and thus solve a common problem seen when targetting Redis clusters. This isn’t necessarily an ideal means of solving this problem, given we’re violating DRY principles by copying the same logic across scripts. It’d be ideal if the underlying ioredis restriction was removed (in a manner which doesn’t entail the performance cost of resubmitting scripts each time).
Affects the following scripts: - moveToDelayed - moveToFinished - retryJob Allows for the `attemptsMade`, `stacktrace` and `message` fields to be updated through Lua scripts, rather than requiring a separate operation (or multiple operations) to set these fields. With the possibility of setting these fields within the context of a single script, we avoid the need to craft a transaction containing both HMSET and EVAL(SHA) commands to achieve atomicity. By shedding the need for a transaction, we are able to avoid redis/ioredis#536 and thus solve a common problem seen when targetting Redis clusters. This isn’t necessarily an ideal means of solving this problem, given we’re violating DRY principles by copying the same logic across scripts. It’d be ideal if the underlying ioredis restriction was removed (in a manner which doesn’t entail the performance cost of resubmitting scripts each time).
Affects the following scripts: - moveToDelayed - moveToFinished - retryJob Allows for the `attemptsMade`, `stacktrace` and `message` fields to be updated through Lua scripts, rather than requiring a separate operation (or multiple operations) to set these fields. With the possibility of setting these fields within the context of a single script, we avoid the need to craft a transaction containing both HMSET and EVAL(SHA) commands to achieve atomicity. By shedding the need for a transaction, we are able to avoid redis/ioredis#536 and thus solve a common problem seen when targetting Redis clusters. This isn’t necessarily an ideal means of solving this problem, given we’re violating DRY principles by copying the same logic across scripts. It’d be ideal if the underlying ioredis restriction was removed (in a manner which doesn’t entail the performance cost of resubmitting scripts each time).
Affects the following scripts: - moveToDelayed - moveToFinished - retryJob Allows for the `attemptsMade`, `stacktrace` and `message` fields to be updated through Lua scripts, rather than requiring a separate operation (or multiple operations) to set these fields. With the possibility of setting these fields within the context of a single script, we avoid the need to craft a transaction containing both HMSET and EVAL(SHA) commands to achieve atomicity. By shedding the need for a transaction, we are able to avoid redis/ioredis#536 and thus solve a common problem seen when targetting Redis clusters. This isn’t necessarily an ideal means of solving this problem, given we’re violating DRY principles by copying the same logic across scripts. It’d be ideal if the underlying ioredis restriction was removed (in a manner which doesn’t entail the performance cost of resubmitting scripts each time).
Fixes #536. Co-Authored-By: Matteo Collina <[email protected]>
🎉 This issue has been resolved in version 4.19.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
FYI, I just upgraded to 4.19.0 and some of Bull tests are failing. I need to investigate more, but for now I will need to lock ioredis to 4.18.0 in order to not break bull users environments. |
sorry. useless comment. |
# [4.19.0](redis/ioredis@v4.18.0...v4.19.0) (2020-10-23) ### Bug Fixes * Ensure delayed callbacks are always invoked. ([d6e78c3](redis/ioredis@d6e78c3)) ### Features * Add autopipeline for commands and allow multi slot pipelines. ([aba3c74](redis/ioredis@aba3c74)), closes [#536](redis/ioredis#536)
According to the documentation "Chaining custom commands in the pipeline is not supported in Cluster mode.".
I am wondering, is this a limitation of ioredis or of redis itself? and do you have any information or link on why this limitation exists?
The text was updated successfully, but these errors were encountered: