Skip to content

Conversation

@Bouncheck
Copy link

@Bouncheck Bouncheck commented Apr 18, 2025

Previously this test was using strong values in cache to prevent them from disappearing mid-test. Code comments explicitly say so. However at some point with the change to using a decorator for CqlPrepareAsyncProcessor it seems that the test was accidentally changed to use weak values.
This change makes the test use a decorator which ignores CacheBuilder passed to it and replaces it with brand new instance that has not yet called .weakValues().

Additionally assertion related to preparedStmtCacheRemoveLatch is moved after typeChangeEventLatch since it looks like the latter triggers the former. This part is mainly cosmetic.

Fixes #476 and #477

@Bouncheck Bouncheck self-assigned this Apr 18, 2025
Previously this test was using strong values in cache to prevent them from
disappearing mid-test. Code comments explicitly say so.
However at some point with the change to using a decorator for
CqlPrepareAsyncProcessor it seems that the test was accidentally changed to
use weak values.
This change makes the test use a decorator which ignores CacheBuilder
passed to it and replaces it with brand new instance that has not yet
called `.weakValues()`.

Additionally assertion related to preparedStmtCacheRemoveLatch is moved after
typeChangeEventLatch since it looks like the latter triggers the former.
This part is mainly cosmetic.
@Bouncheck Bouncheck force-pushed the scylla-4.x-PreparedStatementCachingIT-strong-values branch from 25a6df9 to a3e902c Compare April 18, 2025 17:15
@Bouncheck Bouncheck changed the title 4.x: Do not use weak value cache in PreparedStatementCachingIT 4.x: Use strong value cache in PreparedStatementCachingIT Apr 18, 2025
@Bouncheck Bouncheck requested a review from dkropachev April 18, 2025 17:21
@dkropachev dkropachev merged commit 83ea604 into scylladb:scylla-4.x Apr 21, 2025
8 of 10 checks passed
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.

4.x: PreparedStatementCachingIT.should_invalidate_cache_entry_on_tuple_udt_change_result_set can fail

2 participants