Skip to content

[11.x] Job Batches with Redis Cluster #54522

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

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

vadimonus
Copy link
Contributor

@vadimonus vadimonus commented Feb 8, 2025

Previously discussed in #54205

Currently it is not possible to use job batches with Redis Cluster, both with Predis and Phpredis.

PhpRedis does not supports pipelining for Redis Cluster (https://github.com/phpredis/phpredis/blob/develop/cluster.md#pipelining), but supports transaction (making separate transaction for each node, https://github.com/phpredis/phpredis/blob/develop/cluster.md#transactions)

Predis does not supports transactions for Redis Cluster (https://github.com/predis/predis/blob/v2.x/src/Transaction/MultiExec.php#L77). But it pretty well works with pipelining (https://github.com/predis/predis?tab=readme-ov-file#command-pipelines)

This PR uses transaction, pipelining or both, depending on connection type.

Since #54218 RedisQueue with Redis Cluster is covered with tests. Batch test was skipped for Redis Cluster. Now this test do not fail.

Copy link

github-actions bot commented Feb 8, 2025

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@vadimonus vadimonus force-pushed the batches-with-redis-cluster-11 branch from 26e644a to bf3adaf Compare February 8, 2025 18:10
@vadimonus vadimonus marked this pull request as ready for review February 10, 2025 11:12
@vadimonus vadimonus changed the title Job Batches with Redis Cluster [11.x] Job Batches with Redis Cluster Feb 10, 2025
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

Successfully merging this pull request may close these issues.

None yet

2 participants