mosaic-hgw / gICS

A Generic Informed Consent Service
GNU Affero General Public License v3.0
15 stars 2 forks source link

Rapid successive calls of the API's addConsent method causes SQLIntegrityConstraintViolationException #1

Closed philwinn closed 1 year ago

philwinn commented 2 years ago

Unthrottled mass import of consent documents using gICS (version 2.13.4) SOAP API's addConsent method quickly causes an internal exception java.sql.SQLIntegrityConstraintViolationException (assumingly due to some internal race condition?)

gics-wildfly  | Internal Exception: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '<redacted>' for key 'signer_id.PRIMARY'
gics-wildfly  | Error Code: 1062

and the internal database's integrity seems compromised.

This exception does not occur when successive addConsent invocations are heavily throttled (1 request per 2 seconds). However, such severe throttling effectively prevents the mass import (of many thousands) of consent documents.

mosaic-hgw commented 1 year ago

Fixed in gICS 2023.1.0 available from: https://www.ths-greifswald.de/gics/#download