Execute async cleanup tasks in CoordinatorTests#91794
Execute async cleanup tasks in CoordinatorTests#91794DaveCTurner merged 1 commit intoelastic:mainfrom
Conversation
Closing the `JoinValidationService` will enqueue a cache-cleaning task which must be executed to release any pages held by the cache. This commit also introduces a deterministic leak detector to replace the one based on garbage collection, because in these tests we know exactly the expected lifecycle of all allocated pages. Closes elastic#91599 Closes elastic#91379 Closes elastic#90576
|
Pinging @elastic/es-distributed (Team:Distributed) |
kingherc
left a comment
There was a problem hiding this comment.
LGTM! Just one comment if you think more tracing might help in the future.
| @Override | ||
| public Recycler.V<byte[]> bytePage(boolean clear) { | ||
| final var page = super.bytePage(clear); | ||
| openPages += 1; |
There was a problem hiding this comment.
It would be nice if log is e.g. TRACE to also capture the thread stack of the pages. That way, if the assertion that there is no page remaining fails, we may be able to inspect which thread stacks created them. I believe this should be cheap for the majority of the tests (since I guess they do not run in TRACE mode) and when a test fails we may easily re-run it with TRACE to figure out leaks.
This is optional if you consider this would be beneficial.
There was a problem hiding this comment.
I think I'd prefer not to do this here, it would mean we can't just use a counter to check for leaks (or we'd have two whole different implementations depending on the log level). I'd rather just add such tracing code as and when it's needed.
|
I'm running some iterations of the |
Closing the `JoinValidationService` will enqueue a cache-cleaning task which must be executed to release any pages held by the cache. This commit also introduces a deterministic leak detector to replace the one based on garbage collection, because in these tests we know exactly the expected lifecycle of all allocated pages. Closes elastic#91599 Closes elastic#91379 Closes elastic#90576
Closing the `JoinValidationService` will enqueue a cache-cleaning task which must be executed to release any pages held by the cache. This commit also introduces a deterministic leak detector to replace the one based on garbage collection, because in these tests we know exactly the expected lifecycle of all allocated pages. Closes elastic#91599 Closes elastic#91379 Closes elastic#90576
Closing the `JoinValidationService` will enqueue a cache-cleaning task which must be executed to release any pages held by the cache. This commit also introduces a deterministic leak detector to replace the one based on garbage collection, because in these tests we know exactly the expected lifecycle of all allocated pages. Closes #91599 Closes #91379 Closes #90576
Closing the `JoinValidationService` will enqueue a cache-cleaning task which must be executed to release any pages held by the cache. This commit also introduces a deterministic leak detector to replace the one based on garbage collection, because in these tests we know exactly the expected lifecycle of all allocated pages. Closes #91599 Closes #91379 Closes #90576
Closing the
JoinValidationServicewill enqueue a cache-cleaning task which must be executed to release any pages held by the cache.This commit also introduces a deterministic leak detector to replace the one based on garbage collection, because in these tests we know exactly the expected lifecycle of all allocated pages.
Closes #91599
Closes #91379
Closes #90576