Skip to content

fix(reports): clear serialization buffer after enqueue errors - #1222

Open
chriswessels wants to merge 1 commit into
graphprotocol:mainfrom
graphops:chris/qos-report-enqueue-buffer
Open

chriswessels wants to merge 1 commit into
graphprotocol:mainfrom
graphops:chris/qos-report-enqueue-buffer

Conversation

@chriswessels

Copy link
Copy Markdown

An immediate Kafka enqueue error returns before the reused protobuf buffer is cleared. The next report appends to those bytes, potentially merging records or mixing query and attestation payloads.

Release the producer record's borrow, clear the buffer, then propagate the enqueue result at both send sites. Two tests fill a one-message producer queue without a broker, exercise query and attestation failures, and verify the next report can use a clean buffer.

Validation (on this independent branch):

  • cargo +nightly-2026-06-11 fmt --all -- --check
  • cargo +1.95.0 clippy --all-targets --all-features -- -Dwarnings --force-warn deprecated --force-warn dead-code
  • cargo +1.95.0 test

@chriswessels
chriswessels marked this pull request as ready for review October 29, 2026 13:48
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.

1 participant