Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Cache] Add type to redis scan call to avoid using default "" which r…#51838

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
mfadul24 wants to merge1 commit intosymfony:5.4frommfadul24:fixClearCachePool

Conversation

@mfadul24
Copy link

@mfadul24mfadul24 commentedOct 4, 2023
edited
Loading

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
LicenseMIT

Thecache:pool:clear command is not clearing the existing redis keys correctly. The method is being call without a validtype, which gets a empty array as response.

The redisMONITOR command shows the following type of call:
"SCAN" "0" "COUNT" "1000" "MATCH" "<prefix>:*" "TYPE" ""

Correct would be to set theTYPE tostring.
"SCAN" "0" "COUNT" "1000" "MATCH" "<prefix>:*" "TYPE" "string"

See Documentation:https://redis.io/commands/type/

This PullRequest also fix the deprecation:
Deprecated: Redis::scan(): Passing null to parameter #4 ($type) of type ?string is deprecated {"exception":"[object] (ErrorException(code: 0): Deprecated: Redis::scan(): Passing null to parameter #4 ($type) of type ?string is deprecated at /var/www/vendor/symfony/cache/Traits/Redis6Proxy.php:893)"

@OskarStark
Copy link
Contributor

OskarStark commentedOct 6, 2023
edited
Loading

I removed the deprecations label, as this does not introduce a new deprecation, but fixes one.

Are you sure, this bug does not exist in 5.4?

mfadul24 reacted with thumbs up emoji

@fabpot
Copy link
Member

The code looks the same on 5.4.
Can you add a test as well?

OskarStark and mfadul24 reacted with thumbs up emoji

@mfadul24
Copy link
Author

Hi, I've update the PR to use the 5.4 branch and add a test for this use case. I hope it looks good enough for you. Look forward to my first contribution.

@mfadul24mfadul24 changed the base branch from6.3 to5.4October 9, 2023 20:40
@nicolas-grekas
Copy link
Member

Thanks for giving this a try. I'm closing in favor of#52036, which provides a more generic fix to such issues. This should still be fixed in phpredis, but at least we won't fall into the trap.

nicolas-grekas added a commit that referenced this pull requestOct 13, 2023
…y behaviors of internal classes (nicolas-grekas)This PR was merged into the 6.3 branch.Discussion----------[Cache][VarExporter] Fix proxy generation to deal with edgy behaviors of internal classes| Q             | A| ------------- | ---| Branch?       | 6.3| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       |Fix#51770,#51679,#51700| License       | MITInstead of#51838This fixes the issue by not passing default values explicitly when they were not provided during the call to the method.Commits-------c66a2f7 [Cache][VarExporter] Fix proxy generation to deal with edgy behaviors of internal classes
@mfadul24mfadul24 deleted the fixClearCachePool branchOctober 17, 2023 06:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@OskarStarkOskarStarkOskarStark left review comments

+1 more reviewer

@groensch24groensch24groensch24 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

6 participants

@mfadul24@OskarStark@fabpot@nicolas-grekas@groensch24@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp