CASSANALYTICS-143 Fix various leaks in CDC caching and bridge implementation#189
Conversation
|
|
||
| // Second call is idempotent — the flag stays true and no exception is thrown | ||
| CassandraBridgeFactory.maybeRegisterShutdownHook(); | ||
| assertThat(CassandraBridgeFactory.isShutdownHookRegistered()).isTrue(); |
There was a problem hiding this comment.
Would be helpful to have a test to verify close() is indeed clearing the cache.
There was a problem hiding this comment.
Good call; added both a method for external tests to confirm bridges are closed and a test that populates, confirm live, then closes and confirm closed. We don't necessarily introspect to ensure that the internal close runs actually succeeded (vs. the warn path on catch if they fail), but it at least indicates it went through that path and operated upon them.
There was a problem hiding this comment.
Do we still need this or can we remove it? This one is creating uncached classloader which is never closed.
|
LGTM, only minor comments |
| } | ||
| }); | ||
| COMMIT_LOG_DIRS.clear(); | ||
| CdcBridgeFactory.close(); |
There was a problem hiding this comment.
Don't we need to clear TypeCache here?
…ntation Patch by Josh McKenzie; reviewed by TBD for CASSANALYTICS-143 This patch makes a lot of the lifecycle implementation in tests explicit (temp failes, cleanup of resources, etc) that previously relied on the CI env Just Working. Some of it is about tidying up and making explicit our position on resource management w/regards to test class lifecycle, and some of it is about leaks preventing GC (schema graph, etc).
377d070 to
3401533
Compare
|
Rebased, doing a final run of CI, then will merge. |
|
CI looks mostly clean; failures are the intermittent ones I'm trying to fix here and in other PR's. Merging. |
Patch by Josh McKenzie; reviewed by Shailaja Koppu for CASSANALYTICS-143
This patch makes a lot of the lifecycle implementation in tests explicit (temp fails, cleanup of resources, etc) that previously relied on the CI env Just Working. Some of it is about tidying up and making explicit our position on resource management w/regards to test class lifecycle, and some of it is about leaks preventing GC (schema graph, etc).