Skip to content

Bug 2091129 - Bugzilla::DB pings MySQL before every query (about 200 pings per show_bug.cgi request) - #2821

Open
dklawren wants to merge 2 commits into
mozilla:masterfrom
dklawren:2091129
Open

dklawren wants to merge 2 commits into
mozilla:masterfrom
dklawren:2091129

Conversation

@dklawren

@dklawren dklawren commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the request-scoped database-handle caching change.

No open issues 🎉

What changed in this PR

Reduces repeated database connection checks in Bugzilla by reusing checked handles instead of consulting DBIx::Connector before every query.

Changes:

  • Caches database handles per request, rechecking after five seconds, a process ID change, or handle inactivity.
  • Adds tests for handle reuse, request boundaries, interval expiry, simulated process ID changes, and reconnection after disconnect.
File Description
t/​db-dbh-check.t Tests connection-check frequency and handle revalidation.
Bugzilla/​DB.pm Replaces delegated handle access with request-scoped caching and periodic checks.

Review effort: Balanced

@dklawren
dklawren requested review from Xzzz and cgsheeh November 10, 2026 00:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants