Skip to content

Merge develop branch into master (Backend)#1258

Merged
matsduf merged 6 commits into
masterfrom
develop
Jul 22, 2026
Merged

Merge develop branch into master (Backend)#1258
matsduf merged 6 commits into
masterfrom
develop

Conversation

@matsduf

@matsduf matsduf commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Purpose

This PR is step https://github.com/zonemaster/zonemaster/blob/develop/docs/internal/maintenance/ReleaseProcess-release.md#15-merge-develop-branch-into-master

How to test this PR

"No reviewer or approval is required for this update."

matsduf and others added 6 commits June 29, 2026 20:18
Merge master branch into develop (Backend)
Both the test agent and RPC API fork child processes from a common
parent. The parent process may connect to the database and if that
happens, the child process may reuse the connection that was initiated
by the parent.

However, this causes mayhem in the test agent. While the parent process
uses the DB connection to check for new tests to carry out, the child
processes use that same DB connection to update the test progress and
store the results. DB connection handles aren’t meant to be used
concurrently, so subtle problems can happen in this situation.

It also causes mayhem in the RPCAPI because the common parent makes a
connection before forking the worker children. Each child therefore
shares the same connection handle concurrently, which can also cause the
same subtle problems in production.

The solution is to ensure that database connection handles are always
tied to a specific PID. In Zonemaster::Backend::DB, this check is done
whenever the dbh() method is called: if the current PID is not the same
as the PID that created the database connection, we return a new
connection.
…euse-in-child

Do not reuse DB handles in child processes
Co-authored-by: tgreenx <96772376+tgreenx@users.noreply.github.com>
Updates for release v2026.1.1 (Backend)
@matsduf matsduf added this to the v2026.1.1 milestone Jul 22, 2026
@matsduf matsduf added P-High Priority: Issue to be solved before other RC-None Release category: Not to be included in Changes file. labels Jul 22, 2026
@matsduf
matsduf merged commit 921d9ce into master Jul 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P-High Priority: Issue to be solved before other RC-None Release category: Not to be included in Changes file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants