Skip to content

Make catalog-service cache evictions finish before the call returns - #54

Merged
joaoalbertorsc merged 3 commits into
developfrom
fix/catalog-service/flaky-cache-tests
Nov 18, 2026
Merged

joaoalbertorsc merged 3 commits into
developfrom
fix/catalog-service/flaky-cache-tests

Conversation

@joaoalbertorsc

@joaoalbertorsc joaoalbertorsc commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Evicting a whole cache (@CacheEvict(allEntries = true)) is asynchronous by default in Spring Data Redis 4.1, so editing, publishing or cancelling an event could return while the old entries were still in Redis. A read right after, such as booking-service checking a sector after a cancellation, could get stale data. This also made the cache integration tests fail on CI.

The cache writer now uses immediate writes. An earlier commit here raised the test Redis timeout; it is reverted, since the timeout was not the cause.

@joaoalbertorsc joaoalbertorsc changed the title Stop the flaky Redis cache tests in catalog-service Make catalog-service cache evictions finish before the call returns Nov 18, 2026
@joaoalbertorsc
joaoalbertorsc merged commit a850782 into develop Nov 18, 2026
1 check passed
@joaoalbertorsc
joaoalbertorsc deleted the fix/catalog-service/flaky-cache-tests branch December 3, 2026 16:01
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.

1 participant