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

Nested @CacheResult doesn't work with redis #38219

Closed
sebastian639559 opened this issue Jan 16, 2024 · 5 comments
Closed

Nested @CacheResult doesn't work with redis #38219

sebastian639559 opened this issue Jan 16, 2024 · 5 comments
Labels
area/cache area/redis kind/bug Something isn't working triage/needs-reproducer We are waiting for a reproducer.

Comments

@sebastian639559
Copy link

Describe the bug

Calling foo results in a time-out from the endpoint calling foo:

    @CacheResult(cacheName = "my-cache-1", keyGenerator = MyCacheKeyGenerator.class)
    public String foo(@CacheKey String signId) {
        log.info("1 caching");
        faa("asdf");
        log.info("3 caching");
        return "something-here";
    }


    @CacheResult(cacheName = "my-cache-2", keyGenerator = MyCacheKeyGenerator.class)
    public String faa(@CacheKey String signId) {
        log.info("2 caching");
        return "something-here";
    }

This is possibly because quarkus is not able to keep two connections the a redis instance open at once?

Expected behavior

The code should work, not crash/timeout

Actual behavior

The endpoint calling foo() timesout.

How to Reproduce?

quarkus version 3.3.3
Java version 17

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@sebastian639559 sebastian639559 added the kind/bug Something isn't working label Jan 16, 2024
Copy link

quarkus-bot bot commented Jan 16, 2024

/cc @cescoffier (redis), @gsmet (redis), @gwenneg (cache), @machi1990 (redis)

@cescoffier
Copy link
Member

I would need a reproducer.

However, if both keys are not hosted on the same node, it could be a problem.

@cescoffier cescoffier added the triage/needs-reproducer We are waiting for a reproducer. label Jan 17, 2024
@cescoffier
Copy link
Member

Also, I need to know if you are using optimistic locking.

@geoand
Copy link
Contributor

geoand commented Feb 12, 2024

Closing for lack of feedback

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2024
@dirkbolte
Copy link

In case someone stumbles upon this: #42540 fixes a similar (same?) issue for me (Quarkus 3.13.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cache area/redis kind/bug Something isn't working triage/needs-reproducer We are waiting for a reproducer.
Projects
None yet
Development

No branches or pull requests

4 participants