restore: fix https snapshot peers not selectable - #11379
Open
ripatel-fd wants to merge 1 commit into
Open
Conversation
after parsing a redirect with https peer, ssresolve goes to SHUTTING_DOWN to exchange a TLS close_notify. servers can hang up right after serving the redirect, and ssresolve considers that a failure mistakenly.
┌─ ⚡ PERF · 30bc628 vs main@2aa0641 ─────────────────────────────────
│ SUITE BASELINE NEW Δ
│ replay tps, mainnet 29,863 tps 29,842 tps · -0.07%
│ bench tps, localnet 128,638 tps 128,642 tps · 0.00%
│ snapshot load, testnet 9.19 s 9.17 s · -0.25%
│ mem total, mainnet 171.43 GiB 171.43 GiB · 0.00%
│ mem total, testnet 102.31 GiB 102.31 GiB · 0.00%
│ clean compile, firedancer 215.4 cpu·s 217.9 cpu·s · +1.12%
│ binary size, firedancer 85.86 MB 85.86 MB · 0.00%
├─────────────────────────────────────────────────────────────────────
@@ 0 REGRESSIONS · 0 WARNINGS · 0 IMPROVED · 7 NOISE @@
└───────────────────────────────────────────────────────────────────── |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Combined POLLIN|POLLHUP events can discard a redirect whose response requires multiple reads.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Separates snapshot resolution from TLS shutdown completion so HTTPS peers remain selectable after abrupt server hangups.
Changes:
- Adds resolved-state and forced-finish APIs.
- Preserves parsed results across TLS shutdown failures.
- Adds HTTP/HTTPS redirect regression tests.
File summaries
| File | Description |
|---|---|
fd_ssresolve.c |
Tracks parsed results and supports forced completion. |
fd_ssresolve.h |
Exposes resolution-state APIs. |
fd_http_resolver.c |
Handles post-resolution hangups. |
test_ssresolve.c |
Adds redirect and TLS hangup tests. |
Local.mk |
Registers the new unit test. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return -1; | ||
| } else if( FD_UNLIKELY( res==FD_SSRESOLVE_ADVANCE_AGAIN ) ) { | ||
| return -1; | ||
| return 0; /* let the caller handle POLLERR/POLLHUP below */ |
Comment on lines
+240
to
+241
| static void | ||
| test_https_redirect_then_hangup( void ) { |
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.
after parsing a redirect with https peer, ssresolve goes to
SHUTTING_DOWN to exchange a TLS close_notify. servers can hang up
right after serving the redirect, and ssresolve considers that a
failure mistakenly.