Skip to content

Conversation

@zty200489
Copy link

Fixed default sql query for backend_waiting metric, where multiple locks on the same row may cause spuriously high "blocked_queries".

By adding AND blocking_locks.granted, we only consider lock pairs where the blocking lock is granted (i.e. process is using the lock) and the blocked lock is not granted (i.e. is waiting for lock). This seems more appropriate since the dashboard displays this metric as Blocked Queries, whereas the original query collects all possible potential block pairs.

Fixed `backends_waiting` metric in default monitoring queries.

Signed-off-by: Tianyuan Zhou <[email protected]>
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant