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

Misleading warning (?) cache.WARNING: Failed to save key "mystringtags" of type integer. #34962

Copy link
Copy link
Closed
@rbaarsma

Description

@rbaarsma
Issue body actions

Symfony version(s) affected: 4.4.1

Description
I see this warning in the logs:

cache.WARNING: Failed to save key "stream.thiemo_sysnat_e9_v4-publish-1573137262tags" of type integer. {"key":"stream.thiemo_sysnat_e9_v4-publish-1573137262\u0000tags\u0000","exception":null}

The real problem is probably (?) that I'm trying to invalidateTags where the tag does not exist, but the warning message is not even close to telling me that.

How to reproduce
I'm using both doctrine ORM and doctrine ODM, and re-using the doctrine ORM cache pool to store ODM result cache manually

framework:
    cache:
        pools:
            doctrine.result_cache_pool:
                adapters:
                    - cache.adapter.array
                    - cache.adapter.apcu
                    - cache.adapter.redis
                tags: true

At some point I invalidate tags, but it is possible that the tag has not been created

        $this->doctrineResultCachePool->invalidateTags([
            sprintf('%s-%s-%d', $code, $type, null), // latest version
            sprintf('%s-%s-%d', $code, $type, $revision), // specific revision
        ]);

That's when this message shows up.

Interestingly enough I get 4 warnings, two for each tag. Perhaps the tag was in redis, but not in this pod?

Possible Solution
Improved warning message that I've tried to invalidate a tag that does not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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.