Skip to content
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

[8.x] Fix flushdb for predis cluster #40446

Merged
merged 10 commits into from
Jan 22, 2022
Merged

[8.x] Fix flushdb for predis cluster #40446

merged 10 commits into from
Jan 22, 2022

Conversation

bernardwiesner
Copy link
Contributor

@bernardwiesner bernardwiesner commented Jan 17, 2022

This is to fix this issue: #20406

Redis::flushdb() or Cache::flush does not work currently with predis cluster, this PR fixes that.

@tillkruss asked me to mention him

@bernardwiesner bernardwiesner changed the title Fix flushdb for predis cluster [8.x] Fix flushdb for predis cluster Jan 17, 2022
@tillkruss
Copy link
Contributor

Thanks @bernardwiesner!

Let's move that logic into the PredisClusterConnection class.

@bernardwiesner
Copy link
Contributor Author

@tillkruss
thanks I moved it, let me know if its ok now

@taylorotwell taylorotwell marked this pull request as draft January 17, 2022 19:30
@taylorotwell
Copy link
Member

Please mark as ready for review when all issues have been resolved.

Copy link
Contributor

@tillkruss tillkruss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@bernardwiesner bernardwiesner marked this pull request as ready for review January 18, 2022 03:19
@driesvints driesvints marked this pull request as draft January 18, 2022 17:16
@tillkruss
Copy link
Contributor

@taylorotwell: The fix here will be going from Client::getConnection() to Client::getIterator() which loops over several Predis\Client instances.

@driesvints
Copy link
Member

Please mark this as ready for review when this can be reviewed again.

@tillkruss tillkruss marked this pull request as ready for review January 21, 2022 16:54
otherwise it would return `Predis\Response\Status`
@tillkruss
Copy link
Contributor

@dries: I removed PredisConnection::flushdb() altogether, which allows new modifiers like:

$redis->flushdb('ASYNC');

@taylorotwell taylorotwell merged commit 9eefc94 into laravel:8.x Jan 22, 2022
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.

4 participants