# HG changeset patch # User Alain Mazy # Date 1705913933 -3600 # Node ID 0a8b34e3a337ddbd8d6b9bdc3961c48fe8937916 # Parent 6780dd8b0a660d800972b3192a0a10971333b7fe notes diff -r 6780dd8b0a66 -r 0a8b34e3a337 NOTES --- a/NOTES Thu Jan 18 10:04:43 2024 +0100 +++ b/NOTES Mon Jan 22 09:58:53 2024 +0100 @@ -214,36 +214,14 @@ TODO: - have a separate "thread" to UpdateStatistics ? -- perf tests: upload generated data (different studies) + - check https://discourse.orthanc-server.org/t/image-insert-are-too-slow-databse-performance-too-poor-when-using-mysql-mariadb/3820 -- implement a downgrade script ? And test it in PotgresUpgrades integ tests -- In Docker images, re-enable MySQL & ODBC plugins + tests - -- this error sometimes occur... -====================================================================== -FAIL: test_upload_delete_same_study_from_multiple_threads (Concurrency.test_concurrency.TestConcurrency) ----------------------------------------------------------------------- - Traceback (most recent call last): - File "/home/runner/work/orthanc-builder/orthanc-builder/docker/integration-tests/orthanc-tests-repo-normal/NewTests/Concurrency/test_concurrency.py", line 254, in test_upload_delete_same_study_from_multiple_threads - self.assertEqual(0, len(self.o.studies.get_all_ids())) - AssertionError: 0 != 1 - - 2023-12-21 17:10:04.737 UTC [69] ERROR: deadlock detected - 2023-12-21 17:10:04.737 UTC [69] DETAIL: Process 69 waits for ShareLock on transaction 20657; blocked by process 70. - Process 70 waits for ShareLock on transaction 18193; blocked by process 69. - Process 69: SELECT * FROM DeleteResource($1) - Process 70: SELECT * FROM CreateInstance($1, $2, $3, $4) - 2023-12-21 17:10:04.737 UTC [69] HINT: See server log for query details. - 2023-12-21 17:10:04.737 UTC [69] CONTEXT: while deleting tuple (134,66) in relation "resources" - SQL statement "DELETE FROM ONLY "public"."resources" WHERE $1 OPERATOR(pg_catalog.=) "parentid"" - SQL statement "DELETE FROM Resources WHERE internalId = old.parentId - AND NOT EXISTS (SELECT 1 FROM Resources WHERE parentId = old.parentId)" - PL/pgSQL function resourcedeletedfunc() line 7 at SQL statement - SQL statement "DELETE FROM Resources WHERE internalId=id RETURNING *" - PL/pgSQL function deleteresource(bigint) line 26 at SQL statement - 2023-12-21 17:10:04.737 UTC [69] STATEMENT: SELECT * FROM DeleteResource($1) DONE: +- implement a downgrade script ? And test it in PotgresUpgrades integ tests +- test the transfer plugin +- perf tests: upload generated data (different studies) +- In Docker images, re-enable MySQL & ODBC plugins + tests - reenable PatientRecyclingOrder - force the create/update DB transaction to be serializable (not needed: this is handled by POSTGRESQL_LOCK_DATABASE_SETUP) - PatientAddedFunc contains an IF (check if other IF/THEN/ELSE pattern remains)