(wip) docs(optimizer-analyzer): architecture + sequence diagrams#600
Draft
mkuchenbecker wants to merge 1 commit into
Draft
(wip) docs(optimizer-analyzer): architecture + sequence diagrams#600mkuchenbecker wants to merge 1 commit into
mkuchenbecker wants to merge 1 commit into
Conversation
Component and sequence diagrams for the Optimizer Analyzer (apps/optimizer-analyzer/). Source is PlantUML; PNGs are committed so GitHub renders the markdown without extra tooling. The doc describes the analyzer as introduced in PR #533 (mkuchenb/ optimizer-3). It lands on main as forward-looking documentation; the referenced symbols (TableOperationsHistoryDto::after, CadencePolicy:: intervalFor, @transactional analyzeDatabase) come online when PR #533 merges. Files: - apps/optimizer-analyzer/docs/architecture.md — narrative + diagrams - apps/optimizer-analyzer/docs/diagrams/component.puml + .png - apps/optimizer-analyzer/docs/diagrams/sequence.puml + .png Sequence diagram iterated for correctness against the actual source on mkuchenb/optimizer-3: 3 pre-load reads in (ops, history, stats) order, three-branch CadencePolicy alt (active op / no history / has history), per-row try/catch+continue with aggregate INFO log per database. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Status
(WIP) — draft, ready for review.
Branch is off
linkedin/main. The doc describes the Optimizer Analyzer as introduced by PR #533 (mkuchenb/optimizer-3); referenced symbols (@TransactionalonanalyzeDatabase,TableOperationsHistoryDto::after,CadencePolicy::intervalFor) come online when #533 merges. The doc itself is forward-looking and merges independently.Summary
Hand-written architecture + sequence documentation for
apps/optimizer-analyzer/.apps/optimizer-analyzer/docs/architecture.md— narrativeapps/optimizer-analyzer/docs/diagrams/component.puml+.pngapps/optimizer-analyzer/docs/diagrams/sequence.puml+.pngPlantUML source is committed so the diagrams are regenerable; rendered PNGs are committed so the markdown displays on GitHub without extra tooling.
Diagrams
Component view: AnalyzerApplication → AnalyzerRunner → (OperationAnalyzer strategy + 3 repos) → MySQL. The contract with the Scheduler is the
table_operationstable; no direct call.Sequence view (one operation type, one analyzer pass):
statsRepo.findDistinctDatabaseNames().@Transactional analyzeDatabase(...).isEnabled→shouldSchedule(3-branchCadencePolicy.shouldSchedule— active op / no history / has-history withintervalForcadence) → savePENDINGrow inside a per-rowtry/catch+continue.INFOaggregate per database;DEBUGper table.Iteration
Sequence diagram was iterated on visually against the rendered PNG. Two corrections applied:
Ops → Hist → Statsso the 3 pre-load arrows flow left-to-right instead of crossing.latestHistory.map(readyAfter).orElse(true)is two real paths in the code.Out of scope
🤖 Generated with Claude Code