Skip to content

Chain-trigger parsers, optimize XML collection, tune schedule#88

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/86-collector-chain-triggers
Feb 17, 2026
Merged

Chain-trigger parsers, optimize XML collection, tune schedule#88
erikdarlingdata merged 1 commit intodevfrom
feature/86-collector-chain-triggers

Conversation

@erikdarlingdata
Copy link
Owner

Summary

Closes #86

  • Chain triggers: Blocked process and deadlock XML collectors now immediately call their parsers and analyzer when rows are found, eliminating up to 15 min pipeline latency. Errors are isolated as CHAIN_ERROR log entries — never fail the parent collector.
  • XML collection optimization: Materialize XE ring buffer into a table variable before shredding, avoiding repeated XML document validation on every .value() / .query() call. Under TPC-C load: 35s → 297ms for 79 deadlock events.
  • Lookback window: Master collector now passes @minutes_back = frequency * 2 instead of always defaulting to 15 minutes. At 1-min frequency this means looking back 2 minutes instead of 15 — the single biggest factor in the 100x speedup.
  • Schedule tuning: 18 cheap collectors bumped to 1-min frequency, 4 medium collectors to 2-min. Parsers/analyzer stay at 5-min as safety net.

Test plan

  • Deployed to sql2022, ran under TPC-C workload (32 VUs, 30 min)
  • Chain triggers fire correctly when deadlock/blocking events found
  • Zero CHAIN_ERROR entries in collection_log
  • Deadlock collection: 35s → 297ms (79 events)
  • All 33 collectors running at expected frequencies
  • Master collector avg cycle: 1.4s

🤖 Generated with Claude Code

…e schedule (#86)

- Blocked process and deadlock XML collectors now chain-trigger their
  parsers and analyzer immediately when rows are found, eliminating up
  to 15 min pipeline latency
- Materialize XE ring buffer XML into table variable before shredding,
  avoiding repeated XML document validation (35s → 300ms under load)
- Master collector passes @minutes_back = frequency * 2 instead of
  defaulting to 15 min lookback every cycle
- Bump 18 cheap collectors to 1-min frequency, 4 medium to 2-min

Tested on sql2022 under TPC-C workload: 79 deadlock events collected
in 297ms (was 35s), chain triggers fire correctly, zero CHAIN_ERRORs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit cdc2e6d into dev Feb 17, 2026
6 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/86-collector-chain-triggers branch February 20, 2026 13:20
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