-
Notifications
You must be signed in to change notification settings - Fork 38
4.x: Occasionally force cache cleanup in PreparedStatementCachingIT #513
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
base: scylla-4.x
Are you sure you want to change the base?
4.x: Occasionally force cache cleanup in PreparedStatementCachingIT #513
Conversation
This integration test periodically fails on one of its methods. Evidence points to the cache itself being the culprit, as there is no guarantee that elements will be removed right away. This leads to removal event not being fired and timing out on wait for it. Calling `cache.cleanUp()` seems to greatly improve stability of this test. Fixes scylladb#476 and scylladb#477
ed59669
to
02b72d6
Compare
TBH I don't understand this fix, test checks if certain events where fired, it waits 10 seconds for event to be executed. |
The event is tied to the removal from cache. |
0666b08
to
de10f2f
Compare
Just for the record:
|
In theory yes, but in practice I don't see it being called on failing runs. After adding prints it seems like this place is never reached (only when failing). Cache is capable of returning a view map of size 2 but when forced to print elements it prints nothing as if it was empty. While When running with debugger the test suddenly becomes surprisingly stable, so I was not able to learn anything from that yet.
After the swap the test still fails on prepared statement latch. Maybe another option is that on some runs those prepared statements get somehow garbage collected, but I was under the impression (maybe wrong) that this test avoids that. |
Marking as draft since I'm getting inconsistent results. After creating WeakReferences to the prepared statements and running extra |
I have made some tests, this thing happens because there are no records in the cache. |
This integration test from time to time fails on one of its methods. Evidence points to the cache itself being the culprit, as there is no guarantee that elements will be removed right away. This leads to removal event not being fired and timing out on wait for it. Calling
cache.cleanUp()
seems to greatly improve stability of this test.Fixes #476 and #477