Skip to content

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.

@github-actions
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 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.

2 participants