GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — Evict DNS cache entries when expiration tasks are cancelled by hellboy0621 · Pull Request #18389 · netty/netty Conversation
Contributor
Motivation: When an EventLoop terminates, its DNS cache expiration tasks are cancelled but their entries remain. A reused shared cache can return stale records indefinitely. Modification: Evict entries when the active expiration task is cancelled. Ignore superseded timers and handle cancellation before listener registration. Add regression coverage for positive and negative entries, cache reuse and timer replacement. Result: Entries are evicted early when their expiration task is cancelled, preventing indefinite retention without adding a scheduler. All four regression cases fail before the fix and pass afterwards. The DNS suite reports 359 tests, 17 skipped and zero failures with leak detection enabled. The resolver-dns reactor passes verify, including Checkstyle and API compatibility checks. The leak log check passes. Fixes #17042.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsMotivation: DNS cache expiration tasks are cancelled when their EventLoop terminates, but the corresponding cache entries remain. A shared cache can therefore keep returning stale records indefinitely after the original loop closes. Modification: Listen for cancellation of the active expiration task and evict its entries. Ignore cancellation of superseded timers when shortening a TTL, and handle cancellation before the listener is registered. Add regression tests for positive and negative entries, cache reuse, replacement timers and cancellation before schedule returns. Result: Entries whose expiration task is cancelled are evicted early instead of remaining cached indefinitely. All four regression cases fail before the fix and pass afterwards. The DNS suite reports 359 tests, 17 skipped and no failures with leak detection enabled. The resolver-dns reactor passes verify, including Checkstyle and API compatibility checks, and the leak log check passes. Fixes netty#17042.
normanmaurer
approved these changes
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
normanmaurer
added a commit
that referenced
this pull request
Motivation: The auto-port of #18389 does not compile on 5.0 because FutureListener.operationComplete takes Future<? extends V> there, and DefaultEventLoop no longer exists. Modification: Declare operationComplete(Future<?>) in Cache.Entries and use SingleThreadIoEventLoop with LocalIoHandler in CacheTest. Result: resolver-dns builds on 5.0 and CacheTest passes.
chrisvest
pushed a commit
that referenced
this pull request
…elled (#18392) Auto-port of #18389 to 5.0 Cherry-picked commit: bcb81f7 --- Motivation: When an EventLoop terminates, its DNS cache expiration tasks are cancelled but their entries remain. A reused shared cache can return stale records indefinitely. Modification: Evict entries when the active expiration task is cancelled. Ignore superseded timers and handle cancellation before listener registration. Add regression coverage for positive and negative entries, cache reuse and timer replacement. Result: Entries are evicted early when their expiration task is cancelled, preventing indefinite retention without adding a scheduler. All four regression cases fail before the fix and pass afterwards. The DNS suite reports 359 tests, 17 skipped and zero failures with leak detection enabled. The resolver-dns reactor passes verify, including Checkstyle and API compatibility checks. The leak log check passes. Fixes #17042. --------- Co-authored-by: hellboy0621 <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
chrisvest
pushed a commit
that referenced
this pull request
…#18389) (#18393) Motivation: Port of #18389 to 4.1. When an EventLoop terminates, its DNS cache expiration tasks are cancelled but their entries remain. A reused shared cache can return stale records indefinitely. Modification: Cherry-pick of bcb81f7. The only conflict was in the imports of `Cache.java` (both `PlatformDependent` and the new `Future`/`FutureListener` imports are kept). Entries are now evicted when the active expiration task is cancelled; superseded timers are ignored and cancellation before listener registration is handled. Result: Fixes #17042. Not run locally: the build sandbox could not resolve Maven dependencies, so `CacheTest` was not compiled or executed here. Relying on CI. --------- Co-authored-by: hellboy0621 <[email protected]>
1 of 11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsDevelopmentSuccessfully merging this pull request may close these issues. TTL DNS cache removal relies on Channel's EventLoop lifecycleUh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |