Skip to content

LOG-9386: fix(buffers): replace protobuf nesting-limit fix with merged upstream #26099 - #293

Open
vparfonov wants to merge 1 commit into
ViaQ:v0.54.0-rhfrom
vparfonov:log-9386-replace-25417-with-26099
Open

LOG-9386: fix(buffers): replace protobuf nesting-limit fix with merged upstream #26099#293
vparfonov wants to merge 1 commit into
ViaQ:v0.54.0-rhfrom
vparfonov:log-9386-replace-25417-with-26099

Conversation

@vparfonov

Copy link
Copy Markdown

That PR was ultimately closed in favor of the better solution merged as vectordotdev#26099. This replaces our vectordotdev#25417 port with vectordotdev#26099, adapted onto v0.54.0's buffer base (which predates upstream's TryWriteOutcome refactor, so writer.rs and the disk backend are left untouched).

What vectordotdev#26099 fixes over vectordotdev#25417:

  • State-independent routing: an over-nested event no longer takes a different path based on disk occupancy. Previously it was pruned while the disk had room but forwarded whole once the disk reported full. The overflow decision now lives in BufferSender (via the new Bufferable::is_fully_encodable) and is made before the item reaches any backend, so the same item is treated the same at 99% and 100% full. The disk backend filter is now unconditional.

  • Backend-aware overflow: SenderAdapter::requires_encodable_items() gates the divert so only wire-format-constrained stages (disk) trigger it. A memory overflow stage keeps arbitrarily nested items instead of having them pruned for a disk write that was never the final destination.

  • Single safe budget: the two per-path limits (99 for Log.fields/Trace.fields, 96 for metadata) collapse to one MAX_VALUE_NESTING_FRAMES = 96, the highest limit safe on every wire path. Validation no longer depends on event type or destination field, closing the gap where a non-object Log.value root could pass the gate at cost 97-99 yet fail prost decode on the receiver.

Adds regression tests for the near-full, already-full, and unconstrained-base cases, plus the tightest-wire-path budget check.

…d upstream vectordotdev#26099
The fork adopted vectordotdev#25417 (commit 6873155) early, before
the Vector team approved it. That PR was ultimately closed in favor of the
better solution merged as vectordotdev#26099. This replaces our vectordotdev#25417 port with vectordotdev#26099,
adapted onto v0.54.0's buffer base (which predates upstream's TryWriteOutcome
refactor, so writer.rs and the disk backend are left untouched).
What vectordotdev#26099 fixes over vectordotdev#25417:
- State-independent routing: an over-nested event no longer takes a different
path based on disk occupancy. Previously it was pruned while the disk had
room but forwarded whole once the disk reported full. The overflow decision
now lives in BufferSender (via the new Bufferable::is_fully_encodable) and is
made before the item reaches any backend, so the same item is treated the
same at 99% and 100% full. The disk backend filter is now unconditional.
- Backend-aware overflow: SenderAdapter::requires_encodable_items() gates the
divert so only wire-format-constrained stages (disk) trigger it. A memory
overflow stage keeps arbitrarily nested items instead of having them pruned
for a disk write that was never the final destination.
- Single safe budget: the two per-path limits (99 for Log.fields/Trace.fields,
96 for metadata) collapse to one MAX_VALUE_NESTING_FRAMES = 96, the highest
limit safe on every wire path. Validation no longer depends on event type or
destination field, closing the gap where a non-object Log.value root could
pass the gate at cost 97-99 yet fail prost decode on the receiver.
Adds regression tests for the near-full, already-full, and unconstrained-base
cases, plus the tightest-wire-path budget check.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@openshift-ci-robot

openshift-ci-robot commented Aug 18, 2026

Copy link
Copy Markdown

@vparfonov: This pull request references LOG-9386 which is a valid jira issue.

Details

In response to this:

That PR was ultimately closed in favor of the better solution merged as vectordotdev#26099. This replaces our vectordotdev#25417 port with vectordotdev#26099, adapted onto v0.54.0's buffer base (which predates upstream's TryWriteOutcome refactor, so writer.rs and the disk backend are left untouched).

What vectordotdev#26099 fixes over vectordotdev#25417:

  • State-independent routing: an over-nested event no longer takes a different path based on disk occupancy. Previously it was pruned while the disk had room but forwarded whole once the disk reported full. The overflow decision now lives in BufferSender (via the new Bufferable::is_fully_encodable) and is made before the item reaches any backend, so the same item is treated the same at 99% and 100% full. The disk backend filter is now unconditional.

  • Backend-aware overflow: SenderAdapter::requires_encodable_items() gates the divert so only wire-format-constrained stages (disk) trigger it. A memory overflow stage keeps arbitrarily nested items instead of having them pruned for a disk write that was never the final destination.

  • Single safe budget: the two per-path limits (99 for Log.fields/Trace.fields, 96 for metadata) collapse to one MAX_VALUE_NESTING_FRAMES = 96, the highest limit safe on every wire path. Validation no longer depends on event type or destination field, closing the gap where a non-object Log.value root could pass the gate at cost 97-99 yet fail prost decode on the receiver.

Adds regression tests for the near-full, already-full, and unconstrained-base cases, plus the tightest-wire-path budget check.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d5f8cbc3-7231-4b38-a38c-a0dd85d607de

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vparfonov
Once this PR has been reviewed and has the lgtm label, please assign xperimental for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vparfonov

Copy link
Copy Markdown
Author

/assign @jcantrill
/cc @Clee2691

@openshift-ci

Copy link
Copy Markdown

@vparfonov: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test nameCommitDetailsRequiredRerun command
ci/prow/cluster-logging-operator-e2eb7658adlinktrue/test cluster-logging-operator-e2e

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vparfonov@openshift-ci-robot@jcantrill