Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Long hostnames can alias cache entries, and negative HTTPS entries no longer receive accelerated expiration.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Refactors DNS cache keys and timestamps while sharing a single current-time value with connection-cache cleanup.
Changes:
- Uses binary DNS cache keys and explicit permanence state.
- Records cache insertion times and passes time pointers through pruning.
- Updates connection-idle timing and related unit tests.
File summaries
| File | Description |
|---|---|
tests/unit/unit1607.c |
Adapts DNS cache tests to binary keys and permanence. |
lib/vdns/dnscache.h |
Updates DNS entry fields and pruning API. |
lib/vdns/dnscache.c |
Implements binary keys, permanence, and insertion timestamps. |
lib/multi.c |
Shares one timestamp across cleanup operations. |
lib/conncache.h |
Extends the idle-connection API with a timestamp. |
lib/conncache.c |
Uses the caller-provided timestamp. |
Review details
Suppressed comments (1)
tests/unit/unit1607.c:220
- The assertion now checks
dns->permanent, but its failure text still refers to a zero timestamp. Report the permanent flag so the diagnostic matches the failed condition.
if(dns->permanent && !tests[i].permanent) {
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- pass more `struct curltime` pointers around - as hash keys are now bytes, make the dnscache entry key binary as well, no longer using printf() for formatting - restrict hostname entry lengths to UINT16_MAX and fail otherwise - add a `permanent` bit to entries
icing
force-pushed
the
dnscache-tweaks
branch
from
September 11, 2026 07:46
e2d4fe8 to
85d4b9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
struct curltimepointers aroundpermanentbit to entries