Skip to content

Commit 1e706f0

Browse files
meisterTeldering
authored andcommitted
Turn off innodb-snapshot-isolation.
This is causing some trouble on CI in our integration tests, e.g. https://github.com/DOMjudge/domjudge/actions/runs/18819431955/job/53692609380: ``` 2025-10-26T15:17:47.393646+00:00] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\BadRequestHttpException: "["An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"]" at ImportProblemService.php line 8 96 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException(code: 0): [\"An exception occurred while executing a query: SQLSTATE[40001 ]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\"] at /opt/domjudge/domserver/webapp/src/Service/ImportProblemService. php:896)"} [] ``` Related: #2848
1 parent f356c69 commit 1e706f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/jobs/baseinstall.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ password=${MYSQL_ROOT_PASSWORD}
6767
EOF
6868
cat ~/.my.cnf
6969

70+
# TODO: Remove after fixing https://github.com/DOMjudge/domjudge/issues/2848
71+
mysql_root "SET GLOBAL innodb_snapshot_isolation = OFF;"
72+
7073
mysql_root "CREATE DATABASE IF NOT EXISTS \`$DATABASE_NAME\` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
7174
mysql_root "CREATE USER IF NOT EXISTS \`domjudge\`@'%' IDENTIFIED BY 'domjudge';"
7275
mysql_root "GRANT SELECT, INSERT, UPDATE, DELETE ON \`$DATABASE_NAME\`.* TO 'domjudge'@'%';"
@@ -79,6 +82,7 @@ mysql_root "SELECT USER();"
7982
mysql_root "SELECT user,host FROM mysql.user"
8083
mysql_root "SET GLOBAL max_allowed_packet=1073741824"
8184
mysql_root "SHOW GLOBAL STATUS LIKE 'Connection_errors_%'"
85+
mysql_root "SHOW VARIABLES LIKE 'innodb_snapshot_isolation'"
8286
mysql_root "SHOW VARIABLES LIKE '%_timeout'"
8387
echo "unused:sqlserver:$DATABASE_NAME:domjudge:domjudge:3306" > /opt/domjudge/domserver/etc/dbpasswords.secret
8488
mysql_user "SELECT CURRENT_USER();"

0 commit comments

Comments
 (0)