comparison NOTES @ 453:0a8b34e3a337 pg-transactions

notes
author Alain Mazy <am@osimis.io>
date Mon, 22 Jan 2024 09:58:53 +0100
parents 9e039e65d68e
children bf4b9c7cf338
comparison
equal deleted inserted replaced
452:6780dd8b0a66 453:0a8b34e3a337
212 1 connection : test_upload_delete_same_study_from_multiple_threads with 5 workers and 3x repeat (10x): 11.172 s 212 1 connection : test_upload_delete_same_study_from_multiple_threads with 5 workers and 3x repeat (10x): 11.172 s
213 213
214 214
215 TODO: 215 TODO:
216 - have a separate "thread" to UpdateStatistics ? 216 - have a separate "thread" to UpdateStatistics ?
217
218 - check https://discourse.orthanc-server.org/t/image-insert-are-too-slow-databse-performance-too-poor-when-using-mysql-mariadb/3820
219
220 DONE:
221 - implement a downgrade script ? And test it in PotgresUpgrades integ tests
222 - test the transfer plugin
217 - perf tests: upload generated data (different studies) 223 - perf tests: upload generated data (different studies)
218 - check https://discourse.orthanc-server.org/t/image-insert-are-too-slow-databse-performance-too-poor-when-using-mysql-mariadb/3820
219 - implement a downgrade script ? And test it in PotgresUpgrades integ tests
220 - In Docker images, re-enable MySQL & ODBC plugins + tests 224 - In Docker images, re-enable MySQL & ODBC plugins + tests
221
222 - this error sometimes occur...
223 ======================================================================
224 FAIL: test_upload_delete_same_study_from_multiple_threads (Concurrency.test_concurrency.TestConcurrency)
225 ----------------------------------------------------------------------
226 Traceback (most recent call last):
227 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
228 self.assertEqual(0, len(self.o.studies.get_all_ids()))
229 AssertionError: 0 != 1
230
231 2023-12-21 17:10:04.737 UTC [69] ERROR: deadlock detected
232 2023-12-21 17:10:04.737 UTC [69] DETAIL: Process 69 waits for ShareLock on transaction 20657; blocked by process 70.
233 Process 70 waits for ShareLock on transaction 18193; blocked by process 69.
234 Process 69: SELECT * FROM DeleteResource($1)
235 Process 70: SELECT * FROM CreateInstance($1, $2, $3, $4)
236 2023-12-21 17:10:04.737 UTC [69] HINT: See server log for query details.
237 2023-12-21 17:10:04.737 UTC [69] CONTEXT: while deleting tuple (134,66) in relation "resources"
238 SQL statement "DELETE FROM ONLY "public"."resources" WHERE $1 OPERATOR(pg_catalog.=) "parentid""
239 SQL statement "DELETE FROM Resources WHERE internalId = old.parentId
240 AND NOT EXISTS (SELECT 1 FROM Resources WHERE parentId = old.parentId)"
241 PL/pgSQL function resourcedeletedfunc() line 7 at SQL statement
242 SQL statement "DELETE FROM Resources WHERE internalId=id RETURNING *"
243 PL/pgSQL function deleteresource(bigint) line 26 at SQL statement
244 2023-12-21 17:10:04.737 UTC [69] STATEMENT: SELECT * FROM DeleteResource($1)
245
246 DONE:
247 - reenable PatientRecyclingOrder 225 - reenable PatientRecyclingOrder
248 - force the create/update DB transaction to be serializable (not needed: this is handled by POSTGRESQL_LOCK_DATABASE_SETUP) 226 - force the create/update DB transaction to be serializable (not needed: this is handled by POSTGRESQL_LOCK_DATABASE_SETUP)
249 - PatientAddedFunc contains an IF (check if other IF/THEN/ELSE pattern remains) 227 - PatientAddedFunc contains an IF (check if other IF/THEN/ELSE pattern remains)
250 - validate upgrade DB from previous Orthanc and from scratch 228 - validate upgrade DB from previous Orthanc and from scratch
251 - check minimal version of PG (9.5 - 9.6 ? for create index if not exists): seems to work with 9.5 cfr PotgresUpgrades integ tests 229 - check minimal version of PG (9.5 - 9.6 ? for create index if not exists): seems to work with 9.5 cfr PotgresUpgrades integ tests