Recommendations: per-database RCSI consent cards (reader/writer-gated, contention-scored)#1069
Merged
Merged
Conversation
Surface per-database RCSI (enable READ_COMMITTED_SNAPSHOT) recommendation cards, each Apply-able behind the EXISTING two-sided informed-consent gate. Reuses the proven RcsiHandler + SetDatabaseOptionAsync + FactRiskDisclosure unchanged; the new code only carries data + fans cards. - RemediationAction gains RcsiTarget (db + RcsiInactionFigures) carried on the DB_CONFIG action purely for the reader; never executed from there (DbConfigHandler ignores it). FactRemediation.CollectRcsiTargets collects all qualifying rcsi-off dbs; BuildAction populates RcsiTargets; BuildRcsiAction builds from the same list. - Reader fans each RcsiTarget into a per-db RCSI card (Setting=Rcsi) whose Apply reconstructs a FactKey="RCSI" action with the db's RcsiFigures -> dispatches to RcsiHandler (IsDestructive) + the two-sided consent gate, rendering REAL figures. - AlertContext DTO round-trips RcsiTargets. - CONTENTION GATE: RCSI is recommended only where there is meaningful READER/WRITER blocking (rcsi_reader_writer_pct >= FactRiskDisclosure.ReaderWriterMeaningfulPct). Writer/writer-dominant blocking (X/IX/U) and raw deadlock counts do NOT trigger it -- RCSI does not relieve those. The reader/writer share is classified from the blocked-process report's lock modes. Tests: 351 Dashboard.Tests pass (fan-out, DTO round-trip, contention gate incl. writer/writer-dominant excluded, affordance). Security-reviewed clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ION_MUTEX Two refinements from testing the RCSI cards: - RCSI card severity now reflects the reader/writer blocking it would relieve (its inaction risk), not the flat config-advisory band: >=100 blocking events or >=10 deadlocks -> Critical, >=10 or >=1 -> Warning, else Info. An RCSI rec was sitting at Info next to a Warning blocking-spike, which read wrong. - TRANSACTION_MUTEX added to config.ignored_wait_types -- it is an internal synchronization wait (MARS / multiple requests sharing one transaction), not a DBA-tunable condition, and belongs with the other *_MUTEX waits already ignored. It was omitted from the seed. Added to install/03 (fresh) + an idempotent upgrade script (existing servers, listed in upgrade.txt); the wait collector filters on the list so it stops being collected/surfaced. 358 Dashboard.Tests pass (incl. RcsiSeverityBand boundary cases). Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
Per-database RCSI (enable READ_COMMITTED_SNAPSHOT) recommendation cards, each Apply-able behind the existing two-sided informed-consent gate. Reuses
RcsiHandler+SetDatabaseOptionAsync+FactRiskDisclosureunchanged — the new code only carries data + fans cards.RemediationActiongainsRcsiTarget(db +RcsiInactionFigures) carried on the DB_CONFIG action for the reader (never executed from there —DbConfigHandlerignores it).CollectRcsiTargetscollects qualifying rcsi-off dbs;BuildActionpopulates them;BuildRcsiActionbuilds from the same list. DTO round-trips them.FactKey="RCSI"action with the db's figures → dispatches toRcsiHandler+ the consent gate rendering real numbers.Reader/writer contention gate
RCSI only relieves reader-vs-writer blocking. The gate is the reader/writer share (
>= FactRiskDisclosure.ReaderWriterMeaningfulPct), classified from the blocked-process report's lock modes — not raw blocking/deadlock counts. Writer/writer-dominant contention (X/IX/U) does not trigger an RCSI card.Contention-based severity
The RCSI card's severity reflects the blocking it would relieve (its inaction risk), not the flat config band: ≥100 blocking events or ≥10 deadlocks → Critical; ≥10 or ≥1 → Warning; else Info. (An RCSI rec was sitting at Info next to a Warning blocking-spike.)
Bundled: ignore TRANSACTION_MUTEX
TRANSACTION_MUTEX(internal synchronization wait — MARS / shared transaction; not DBA-actionable) was missing fromconfig.ignored_wait_typesdespite 6 other*_MUTEXwaits being ignored. Added to install/03 (fresh) + an idempotent upgrade script (existing servers).Verification
🤖 Generated with Claude Code