irma-frontend icon indicating copy to clipboard operation
irma-frontend copied to clipboard

Possible race condition with hashes

Open commial opened this issue 9 years ago • 2 comments

To reproduce: ask for multiple scans with the same hash at the same time (using the API). The code ends on an error raised by load_from_sha256, because there are several entries in File (in DB) for the same hash...

Maybe related: there is no unique constraint on hash fields in the database, but the case is already considered through the MultipleResultsFound exception catch.

commial avatar Sep 22 '16 10:09 commial

for reproducing you are scanning multiple times the same files ? (through irma-cli test i guess)

ch0k0bn avatar Sep 22 '16 13:09 ch0k0bn

We are talking to the REST API, asking to do several different scans containing the same files, but with a "re-scan" enforcement.

commial avatar Sep 22 '16 14:09 commial