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

Appearance settings

[Cache] Redis clear cursor error with Valkey #58660

Copy link
Copy link
Closed
@thomas-hiron

Description

@thomas-hiron
Issue body actions

Symfony version(s) affected

7.1.2

Description

I'm trying to flush doctrine metadata using Redis adapter with Valkey 8.0.
The RedisTrait sends the following query to Valkey: SCAN NULL on the first loop iteration, which leads to error ERR invalid cursor.

Shouldn't the cursor variable initialized to value 0?
I've patched the file with $cursor = 0; instead, and bin/console doctrine:cache:clear-metadata works as expected.

How to reproduce

I'm using the following configuration:

doctrine:
    orm:
        metadata_cache_driver:
            type: pool
            pool: doctrine_redis

framework:
    cache:
        pools:
            doctrine_redis:
                adapter: cache.adapter.redis
                provider: snc_redis.doctrine_metadata_cache

snc_redis:
    clients:
        doctrine_metadata_cache:
            type: predis
            alias: doctrine_metadata_cache
            dsn: "%env(REDIS_URL)%/3"
            options:
                connection_timeout: 10
                read_write_timeout: 30

And run bin/console doctrine:cache:clear-metadata to get the error.

You can also use directly valkey-cli SCAN NULL

Possible Solution

Initialize the cursor variable with 0.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.