- Issue created by @ckspringbok
- Status changed to Postponed: needs info
4 months ago 12:53pm 26 August 2024 You simply must share your code that triggers a bug for a bug report.
When in hook_modules_installed the function $user->save() is used (on module install) it raises an error on the database-server. But still the results are fine. (roles are added to the user).
Unable to decode output into JSON: Syntax error
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction:
INSERT INTO "cache_config" ("cid", "expire", "created", "tags", "checksum", "data", "serialized") VALUES (:db_insert_placeholder_0, :db_inse
rt_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeho
lder_6) ON DUPLICATE KEY UPDATE "cid" = VALUES("cid"), "expire" = VALUES("expire"), "created" = VALUES("created"), "tags" = VALUES("tags"),
"checksum" = VALUES("checksum"), "data" = VALUES("data"), "serialized" = VALUES("serialized"); Array
(
[:db_insert_placeholder_0] => last_write_timestamp_cache_config
[:db_insert_placeholder_1] => -1
[:db_insert_placeholder_2] => 1724654985.414
[:db_insert_placeholder_3] =>
[:db_insert_placeholder_4] => 0
[:db_insert_placeholder_5] => d:1724654985.415;
[:db_insert_placeholder_6] => 1
)
in Drupal\Core\Cache\DatabaseBackend->doSetMultiple() (line 312 of /var/www/clients/client1/web12/web/drupal/docroot/core/lib/Drupal/Core/C
ache/DatabaseBackend.php).
Use function $user->save() in hook_modules_installed or hook_install()
After investigation the $user->save() function seems to flood the cache-config table
Postponed: needs info
10.3 ✨
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
You simply must share your code that triggers a bug for a bug report.