Skip to content

docs: document sensor-to-central message flow#19403

Open
guzalv wants to merge 4 commits intomasterfrom
gualvare/add-sensor-central-data-flow-readme
Open

docs: document sensor-to-central message flow#19403
guzalv wants to merge 4 commits intomasterfrom
gualvare/add-sensor-central-data-flow-readme

Conversation

@guzalv
Copy link
Contributor

@guzalv guzalv commented Mar 12, 2026

Description

This PR adds a markdown file explaining the architecture of the parts of Central involved in processing messages from Sensor.

This became relevant while investigating out-of-memory crashes, and is the product of the author's research and conversations with AI agents.

The diagram was drawn by the author, and the text was written by Claude based on notes about this topic and the source code. Afterwards another Claude model was instructed to thoroughly review the document and check each claim against the source code.

What follows is mostly written by AI.

Description (AI)

Add a README documenting the sensor-to-central message flow architecture in
central/sensor/service/connection/. The document covers:

  • The 5-layer queue architecture (gRPC stream → per-type DedupingQueues → per-resource
    workerQueues → sharded DedupingQueues → pipeline fragments)
  • A dedicated Deduplication section
  • An Excalidraw data-flow diagram
  • Line-number anchored Key Code Locations section

Also adds a pointer to the README from AGENTS.md.

The document was written by Claude (AI) with several deep-dive research sessions into the
codebase, reviewed for correctness against the actual source, and corrected where the
initial version had inaccuracies.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

Documentation-only change. No automated tests needed.

How I validated my change

Every claim in the README was verified against the source code.

Diagram made by @guzalv, text written by Claude after several "deep
dive" sessions looking into the architecture with the author.

Co-authored-by: Claude <claude@anthropic.com>
@openshift-ci
Copy link

openshift-ci bot commented Mar 12, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Mar 12, 2026

Images are ready for the commit at 9322231.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-313-g9322231210.

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.69%. Comparing base (52688db) to head (9322231).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19403   +/-   ##
=======================================
  Coverage   49.68%   49.69%           
=======================================
  Files        2700     2700           
  Lines      203278   203297   +19     
=======================================
+ Hits       100999   101022   +23     
+ Misses      94753    94750    -3     
+ Partials     7526     7525    -1     
Flag Coverage Δ
go-unit-tests 49.69% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

guzalv added 3 commits March 12, 2026 22:50
All DedupingQueue instances at every layer have no capacity cap.
If a producer outpaces its consumer goroutine, memory grows without
limit. Added a Gotcha in Layer 2 (where DedupingQueues are first
introduced) covering all layers at once.

Partially generated by AI (Claude Opus 4.6).
Items move through Layers 2 and 3 by dispatching only (no heavy work).
They actually accumulate in Layer 4 while waiting for pipeline fragments
to process them (DB writes etc.). That is the realistic backlog point.

Partially generated by AI (Claude Opus 4.6).
@guzalv guzalv requested a review from a team March 12, 2026 21:58
@guzalv guzalv marked this pull request as ready for review March 12, 2026 21:59
Sign up for free to 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.

2 participants