Reduce sync_traversal_ids timeout

What does this MR do and why?

Replace the nowait lock handling mechanism with a short duration (500ms) query timeout. The nowait was found to be too restrictive so we're trying this timeout method instead.

During review I had to modify the query limits counter to ignore SET and RESET SQL statements.

I'll continue with the same feature flag.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/468848

Edited by Alex Pooley

Merge request reports

Loading