Skip to content

Defer destination CID replacement - #6298

Open
Guillaume Hetier (guhetier) wants to merge 10 commits into
guhetier/defer_active_path_copilotfrom
guhetier/defer_path_cid_replacement_copilot
Open

Defer destination CID replacement#6298
Guillaume Hetier (guhetier) wants to merge 10 commits into
guhetier/defer_active_path_copilotfrom
guhetier/defer_path_cid_replacement_copilot

Conversation

@guhetier

Copy link
Copy Markdown
Collaborator

Description

Defers destination CID replacement and path removal until receive processing no longer holds path pointers. Pending migration paths receive CID priority; migration is canceled when no CID is available, then remaining paths are updated or removed safely. Preserves silent abort behavior when an in-use CID was retired before frame processing fails.

Testing

Debug x64 Schannel build. Focused migration, rebinding, and path-validation tests (308 cases).

Documentation

No documentation impact.

Comment thread src/core/path.c
//
// Reprocess this index because removal shifted the remaining paths down.
//
--i;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional and needed for now, will be fixed with a refactor of QuicPathRemove later in the stack

Mark destination CIDs retired while processing frames, then replace them or remove unusable paths after receive batches no longer hold path pointers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Preserve silent abort handling after retiring an in-use CID and ensure a pending activation target replaces a retired CID before activation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Move pending-path CID provisioning into active-path update, keep the CID helper private, correct its annotation, and clarify removal-loop index handling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
@guhetier
Guillaume Hetier (guhetier) force-pushed the guhetier/defer_path_cid_replacement_copilot branch from 40dcafa to d296e37 Compare September 3, 2026 23:42
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.01887% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.52%. Comparing base (64e50bd) to head (2decdde).

Files with missing lines Patch % Lines
src/core/path.c 84.09% 7 Missing ⚠️
src/core/connection.c 77.77% 2 Missing ⚠️
Additional details and impacted files
@@                          Coverage Diff                           @@
##           guhetier/defer_active_path_copilot    #6298      +/-   ##
======================================================================
- Coverage                               85.57%   85.52%   -0.05%     
======================================================================
  Files                                      60       60              
  Lines                                   19033    19017      -16     
======================================================================
- Hits                                    16287    16265      -22     
- Misses                                   2746     2752       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Treat retiring a missing destination CID as a successful no-op.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Place QuicPathUpdateDestCid at its first declaration and remove the unnecessary scope in active path update.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Keep the retired destination CID associated with its path when no replacement is available, and validate the committed active path after path activation reorders the array.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
A path may retain a retired destination CID until deferred replacement. Skip the retirement bookkeeping when replacing one that is already retired.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Guard the retirement bookkeeping at its mutation boundary so replacing an already-retired CID cannot update connection CID counters twice.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
@guhetier
Guillaume Hetier (guhetier) marked this pull request as ready for review September 5, 2026 01:56
@guhetier
Guillaume Hetier (guhetier) requested a review from a team as a code owner September 5, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants