Repository navigation
Azure SQL Database: a monitored master's analysis findings no longer repeat the blocking and deadlocks of databases monitored as their own targets - #4906
Merged
Conversation
… and deadlocks that belong to databases monitored as their own targets
…s for databases monitored as their own targets
… from the live store set, by store id
…ases, and the deadlock every-process rule lives in one place
…he sustained-blocking template warns about a master target
…findings skip databases monitored as their own targets
…indings skip databases monitored as their own targets
…ck findings skip databases monitored as their own targets
…k findings skip databases monitored as their own targets
…its closing parenthesis, since another argument now follows it
…ence and fact reads
BLOCKING_CHAIN and the blocking/deadlock drill-downs skip databases monitored as their own targets.
The fact and compare reads fill the list like AnalyzeAsync. The deadlock count counts a deadlock whose
victim database is outside the list in SQL and parses graphs only for the rest. {SCOPE} sits at the end
of its line so an empty list gives the old text. The static provider is internal and a throwing provider
falls back to unscoped.
… master target; bound the deadlock graph read BLOCKING_CHAIN drops pairs of databases monitored as their own targets. The top-deadlock and top-blocking drill-downs apply the same rule. Deadlocks whose named victim database is not separately monitored are counted in SQL and their graphs are not read; the anomaly path uses the detector's command timeout. The list is passed raw and both sides fold with one lower(). MCP analyze_server and the web read tools resolve the list per call from the live registry.
… and recognises Azure SQL Database by its stored engine edition
erikdarlingdata
added a commit
that referenced
this pull request
Oct 1, 2026
…d row is checked by its graph, and the unscoped text is unchanged
…a failing scope resolver degrades to unscoped
erikdarlingdata
added a commit
that referenced
this pull request
Oct 1, 2026
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.
What a user saw
An Azure SQL Database target on a logical server's
mastercollects blocked-process reports and deadlocks for every database on the server. #4894 stops that master target from ALERTING on the events of databases that are also monitored as their own targets. The analysis findings are a second notifying path: email and webhooks, on by default in Darling. On the master target they still counted those databases' events (BLOCKING_EVENTS,BLOCKING_CHAIN,DEADLOCKS,ANOMALY_BLOCKING_SPIKE,ANOMALY_DEADLOCK_SPIKE), and the drill-down evidence showed them. So the same incident paged twice, and the master copy named no database.What changed
The rule, shared with the alert sweep:
AnalysisContext.SeparatelyMonitoredDatabasescarries the same list the alert sweep uses (Azure SQL Database: a monitored master no longer duplicates blocking and deadlock alerts for databases monitored as their own targets #4894'sAzureMasterScope): the databases monitored as their own targets on the same server, set only for an Azure SQL Databasemastertarget.PerformanceMonitor.Common.DeadlockGraphDatabases.AllIn; the alert engine'sIsDeadlockExcludeddelegates to it).masteris counted in SQL without reading its graph. Graphs are read only for a NULL,master-stamped or in-list database. A row stampedmaster(it can be the connection's fallback) is always decided by its graph.What applies it, in both apps:
BLOCKING_EVENTS,BLOCKING_CHAIN(the reconstructed chains drop pairs in the list, on the blocked-process and DMV arms) andDEADLOCKS.CollectAndScoreFactsAsyncandComparePeriodsAsync, and Darling's MCPanalyze_server, fact and compare reads and the web endpoints, throughDarlingAnalysisService.ScopeForAsync.Where the list comes from:
AzureMasterScopecall as the alert sweep, over the live registry by store id. Scheduled passes andanalyze_nowboth pass it.server_properties.engine_editionis 5, the value the probe stored, so a private endpoint, a sovereign cloud or a DNS alias agrees with the worker. No row, a NULL edition or any other edition gives no list.Not changed
ExcludedDatabasesin analysis.Pins
AzureMasterAnalysisScopeTests:BLOCKING_EVENTSwith NULL rows counted;BLOCKING_CHAIN(only the pair outside the list remains);DEADLOCKS(an all-listed graph skipped, a mixed one kept, amaster-stamped one decided by its graph); both spikes on both arms; the drill-down evidence; the provider fill keeps an explicit list; a throwing provider degrades to unscoped; null and empty guards.AzureMasterAnalysisScopeLiveTests(live store): the facts,BLOCKING_CHAIN, deadlocks (includingmaster-stamped and unparseable graphs), the spikes, the drill-downs, the worker fill, the MCP/web resolver by stored engine edition (a private-endpoint edition-5 host, an edition-8 host, no row, NULL, newest wins), and a throwing resolver giving an unscoped result while cancellation still propagates. RED before the first fix: 6 of 7 failed (blocking 5 vs 2, deadlocks 3 vs 1, the spikes, the fill).DeadlockGraphDatabasesTests: all-in, mixed, no processes, bad XML, and agreement with the alert engine's check.PostgresEngineGateBehaviorTestssets the server registry the pass now reads.CHANGELOG
None: this widens #4894's entry, which the maintainer words to cover the analysis findings too. Shipped in v3.8.0: v3.8.0's fact collectors already counted every blocked-process and deadlock row for the server.