Repository navigation
The workers child's tracker loop and boot reads, and the drops timer flush, carry query tags - #207
Merged
Merged
Conversation
zlareb1
force-pushed
the
fix/worker-child-query-tags
branch
2 times, most recently
from
November 3, 2026 12:39
0873070 to
d3ecc4c
Compare
…flush, carry query tags These run in tasks no request or worker pass reaches, so their statements reached ClickHouse as untagged:<module>.<function>. The web process's copy of the tracker loop already sets tracker.sources_refresh. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ild's and the drops' tests Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
fix/worker-child-query-tags
branch
from
November 3, 2026 13:01
acb2d82 to
fe26578
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The workers process's tracker-registry refresh and startup reads, and every process's timed flush of the memory drop log, now carry their own query tags in
system.query_log.Why
These loops run in tasks that no request or worker pass reaches, and none of them set a tag. Their statements therefore reached ClickHouse as
untagged:<module>.<function>, which theclickhouse-sqlrule asks a background loop to avoid:tracker_sources_refresh_seconds;The web process's copy of the tracker loop already sets
tracker.sources_refresh(server/boot.py).Measured on a local server with workers in a child process (
LOOM_BACKGROUND_WORKERS=auto,LOOM_DEPLOYMENT=true), over a few minutes ofsystem.query_log. Before this change, the repeating statements came in asuntagged:tracker.app.registry_sources._read_rowsanduntagged:memory.app.drops.flush_drops. After it, they carrytracker.sources_refresh(5 statements),drops.flush(5) andboot.workers_child(3), and neither untagged name appears.The remaining
untagged:statements are one-shot: the web process's boot reads (the schema status, the vector probes) and the shutdown drains of both processes. The fallback names their caller, so they stay as they are.Scope and risk
server/worker_main.pyand the drops timer inserver/memory/app/drops.py.boot.workers_child. Each of them (provider refresh, repository refresh, runtime overrides, tracker refresh, the calibration refresh) sets its own tag first.Compatibility, rollout and rollback
log_commentsee three new tag names in place of theuntagged:ones.Tests
New tests in
tests/unit/test_workers_child.py(a shared fixture with the child's existing boot test) andtests/unit/test_memory_drops.pyrecord the tag each ClickHouse-bound call sees:drops.flush;boot.workers_child, and the loop's next refresh undertracker.sources_refresh;Both tests fail on
main.The
system.query_logcomparison above.make format lint typecheck test-unitpass.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. The untagged statements were measured before and after on a local server.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.main; no merged migration is edited (none).frontend/changed (unchanged).docs/describe the system as it now is, and this description names any operator steps and wire changes.git commit -s).🤖 Generated with Claude Code