Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Cache] Throw when "redis_sentinel" is used with a non-Predis "class" option #46401

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

Closed
wants to merge 0 commits into from

Conversation

buffcode
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

Enforce usage of \Predis\Client when the redis_sentinel option is enabled.

Otherwise it is possible to give the option class: Redis, which will setup the connection without any error but fail to work, because the Redis commands will be issued against the Sentinel instances instead of the Redis instances.

@buffcode
Copy link
Contributor Author

AppVeyor check result seems to be unrelated, tests are successful but the job times out: Build execution time has reached the maximum allowed time for your plan (20 minutes).

@carsonbot
Copy link

Hey!

I think @jonashrem has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@nicolas-grekas nicolas-grekas changed the title [Cache] Enforce usage of Predis with Sentinel [Cache] Throw when "redis_sentinel" is used with a non-Predis "class" option May 21, 2022
@nicolas-grekas
Copy link
Member

Thank you @buffcode.

nicolas-grekas added a commit that referenced this pull request May 21, 2022
…dis "class" option (buffcode)

This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Throw when "redis_sentinel" is used with a non-Predis "class" option

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

Enforce usage of `\Predis\Client` when the `redis_sentinel` option is enabled.

Otherwise it is possible to give the option `class: Redis`, which will setup the connection without any error but fail to work, because the Redis commands will be issued against the Sentinel instances instead of the Redis instances.

Commits
-------

cdc9414 [Cache] Throw when "redis_sentinel" is used with a non-Predis "class" option
@buffcode buffcode deleted the patch-2 branch May 21, 2022 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants