From 671097cb26723bfc47dd366db96eadc1e3271809 Mon Sep 17 00:00:00 2001 From: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Date: Thu, 30 Jul 2026 14:21:52 +0300 Subject: [PATCH 1/4] Build/Test Tools: Relax redo log durability for the test database. The mysql service sets no command and ships no my.cnf, so it runs with innodb_flush_log_at_trx_commit=1 and flushes the redo log to disk at every commit. The PHPUnit suite commits twice per test class, so the multisite suite pays about 1,622 redo-log fsyncs per run to protect a database that every job destroys. Value 2 removes those fsyncs and still writes the log at every commit, so only a kernel crash or power cut can lose data, not a mysqld crash. See #65762. --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index cc2ed8d94975e..547a3b9b136be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,6 +66,8 @@ services: mysql: image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} + command: [ "--innodb-flush-log-at-trx-commit=2" ] + networks: - wpdevnet From def11b03fb95fedd2c133bfe635227f5f16320ad Mon Sep 17 00:00:00 2001 From: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:41:46 +0300 Subject: [PATCH 2/4] Build/Test Tools: Note why the test database relaxes redo log durability. --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 547a3b9b136be..d93854ef842e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,6 +66,7 @@ services: mysql: image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} + # This database is disposable, so it does not need a durable write at every commit. command: [ "--innodb-flush-log-at-trx-commit=2" ] networks: From a83302a7ae21cc1ef4baf27e906313257cf0bf57 Mon Sep 17 00:00:00 2001 From: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Date: Thu, 30 Jul 2026 16:02:46 +0300 Subject: [PATCH 3/4] Build/Test Tools: Run the PHPUnit tests when the Docker environment changes. docker-compose.yml defines the environment the suite runs in, but the PHPUnit workflow does not list it in its path filter. A change to that environment therefore never runs the tests it affects. See #65762. --- .github/workflows/phpunit-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index a9be5d8565fe3..b91f0c5da0df6 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -31,6 +31,7 @@ on: - 'tests/phpunit/**' - 'tests/phpunit/multisite.xml' - 'phpunit.xml.dist' + - 'docker-compose.yml' # Confirm any changes to relevant workflow files. - '.github/workflows/phpunit-tests.yml' - '.github/workflows/reusable-phpunit-tests-*.yml' From 5d81e2cee243793c4635329c1a671f73538353d2 Mon Sep 17 00:00:00 2001 From: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Date: Thu, 30 Jul 2026 16:28:59 +0300 Subject: [PATCH 4/4] MEASUREMENT: try innodb_flush_log_at_trx_commit=0 (to be reverted) --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d93854ef842e5..c672fe29573db 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,7 +67,7 @@ services: image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} # This database is disposable, so it does not need a durable write at every commit. - command: [ "--innodb-flush-log-at-trx-commit=2" ] + command: [ "--innodb-flush-log-at-trx-commit=0" ] networks: - wpdevnet