Skip to content

refactor(codecs): assemble final GELF chunk directly - #26299

Merged
pront merged 3 commits into
masterfrom
pront-gelf-final-chunk-assembly
Sep 8, 2026
Merged

refactor(codecs): assemble final GELF chunk directly#26299
pront merged 3 commits into
masterfrom
pront-gelf-final-chunk-assembly

Conversation

@pront

@pront pront commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

Motivation

Final GELF chunk assembly was coupled to mutable pending-message state, which made the later resource-accounting changes harder to reason about.

Changes

  • Consume the completed message state before assembling the output.
  • Cancel its timeout before releasing the message-ID lock so an old callback cannot remove a newly reused ID.
  • Verify timeout callback identity before removal in case cancellation races a callback already waiting on the lock.
  • Insert the final chunk directly in sequence instead of storing and copying it again.
  • Keep the existing per-message length behavior unchanged.

References

Related: #26137

Stack: #26299 -> #26300 -> #26301 -> #26302

Vector configuration

Not applicable; this refactors the decoder internals.

How did you test this PR?

Focused chunked GELF tests cover ordered, unordered, and final-chunk assembly, including timeout cancellation.

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

Contributor Guidelines

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Before pushing, follow our pre-push guidance.
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.

@pront
pront requested a review from a team as a code owner September 3, 2026 17:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T19:25:19.565897Z 415596a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pront pront added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Sep 3, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1961f0ae35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/codecs/src/decoding/framing/chunked_gelf.rs
@pront

pront commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@codex review again

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 415596a852

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pront
pront added this pull request to the merge queue Sep 8, 2026
Merged via the queue into master with commit de57a11 Sep 8, 2026
82 checks passed
@pront
pront deleted the pront-gelf-final-chunk-assembly branch September 8, 2026 15:31
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants