-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] Support Redis Sentinel mode when using phpredis/phpredis extension #39363
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
[Cache] Support Redis Sentinel mode when using phpredis/phpredis extension #39363
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
The version 5.2.0 of the [Redis PHP extension](http://pecl.php.net/package/redis), released back in March 2020, added support for Redis Sentinel mode with the help of the `RedisSentinel` class. Usage of the `Symfony/Cache RedisAdapter` can continue to be the same, thus relying on the `$options['redis_persistent']` option to both enable and define the master name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks! Here is some nitpicking.
src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterSentinelTest.php
Outdated
Show resolved
Hide resolved
Thank you for the feedback! Not nitpicking at all. I've resolved them and added a fixup commit. The failing Travis build is not related to my changes, perhaps you could retry it? I don't have the powerz! :P |
Thank you @renan. |
…s/phpredis extension (renan) This PR was squashed before being merged into the 5.3-dev branch. Discussion ---------- [Cache] Support Redis Sentinel mode when using phpredis/phpredis extension | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #39362 | License | MIT | Doc PR | symfony/symfony-docs#14668 The version 5.2.0 of the [Redis PHP extension](http://pecl.php.net/package/redis), released back in March 2020, added support for Redis Sentinel mode with the help of the `RedisSentinel` class. Usage of the `Symfony/Cache RedisAdapter` can continue to be the same, thus relying on the `$options['redis_persistent']` option to both enable and define the master name. Commits ------- 814ffab [Cache] Support Redis Sentinel mode when using phpredis/phpredis extension
I'm going to fix that inline, thanks for the notice. |
… `\Redis` (ferrastas) This PR was merged into the 5.3-dev branch. Discussion ---------- [Cache] Make use of `read_timeout` in `\RedisSentinel` and `\Redis` | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #39429 | License | MIT This is a bugfix for #39363 a feature introduced in 5.x As described in issue #39429, `\RedisSentinel` accepts an optional read timeout value during construction. `read_timeout` is already part of the connection options, this PR just make use of it. Commits ------- 14e36a2 [Cache] Make use of `read_timeout` in `\RedisSentinel` and `\Redis`
… extension (renan) This PR was merged into the 5.3-dev branch. Discussion ---------- Support Redis Sentinel mode when using phpredis/phpredis extension See symfony/symfony#39363 Commits ------- 46d1f1a Support Redis Sentinel mode when using phpredis/phpredis extension
The version 5.2.0 of the Redis PHP extension, released back in March 2020, added support for Redis Sentinel mode with the help of the
RedisSentinel
class.Usage of the
Symfony/Cache RedisAdapter
can continue to be the same, thus relying on the$options['redis_persistent']
option to both enable and define the master name.