You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] When generating recommendations - only report on databases that exist on the primary, or are local and not participating in the AG #5558
When using the recommendations tab, for example, against a 3 node AG where all AG groups can run on any node (inherited), an issue with a database is reported for each of the node - irrespective of it being the primary node for that DB, and gives false positives.
Proposed Solution
Could the functionality be introduced to only report on databases that are either local to the host (no AG) or are on the primary node - using something like sys.fn_hadr_is_primary_replica(dbname)?
Use Case
It would stop false positives being shown against secondary instances, whereas the change would only need to be done on the primary node.
Thanks, this is a real false positive. A database setting is the same on every copy of an Availability Group database, so today every node reports it.
The plan:
Lite and Darling already collect which replica is primary for each group. The Recommendations tab will use that data. When this node holds a secondary copy of a database, it skips findings that come from data every copy shares. That covers database settings (such as auto-shrink or RCSI), percent file growth, Query Store plan regressions and table growth. On the FinOps Recommendations tab it covers idle databases, dev and test database names, TDE blockers and compression candidates.
Findings about work done on the node stay on that node: queries, missing indexes, plan warnings, blocking, waits and I/O. A readable secondary that runs reports has its own workload.
Databases that are not in a group, and server-level findings, do not change.
If the group data is missing, old or unclear, nothing is skipped.
The tab says how many databases it skipped and why.
The change reads data we already store, so it adds no new query against your servers. Lite and Darling get it together.
Fixed by #5564, merged into dev. For a database this node holds only as an Availability Group secondary copy, Lite and Darling no longer report the findings that come from data every copy shares, such as database settings and Query Store regressions. The node that holds the primary copy reports them. It ships in 3.10. Claude posting for Erik Darling.
Activity
erikdarlingdata commentedon Oct 8, 2026
Claude posting for Erik Darling.
Thanks, this is a real false positive. A database setting is the same on every copy of an Availability Group database, so today every node reports it.
The plan:
The change reads data we already store, so it adds no new query against your servers. Lite and Darling get it together.
Darling: replicated facts skip secondary copies, every analysis conte…
Recommendations say when databases were skipped as a secondary copy: …
FinOps Recommendations skip databases that are a secondary copy on th…
Member-scan guard: list AgReplicaScope.IsFresh as a known truncated r…
Fold PR #5564 round 1: Lite reads AG state through v_ views, set reso…
Reads traits on the new scope test classes; Darling secondary-set rea…
get_analysis_facts carries secondary_replica_note on Lite and Darling…
PR #5564 round 2: notes come from the set the read filtered with, dat…
Recommendations skip databases that are a secondary copy on this node (…
erikdarlingdata commentedon Oct 8, 2026
Fixed by #5564, merged into dev. For a database this node holds only as an Availability Group secondary copy, Lite and Darling no longer report the findings that come from data every copy shares, such as database settings and Query Store regressions. The node that holds the primary copy reports them. It ships in 3.10. Claude posting for Erik Darling.
Recommendations skip databases that are a secondary copy on this node (…