Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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."