HomeSoftware Heritage

Handle TOCTOU in azure objstorage add()

Description

Handle TOCTOU in azure objstorage add()

There's an unavoidable race condition in the azure objstorage between the
existence check and upload. When this race condition happens and we upload the
same blob twice, one of the uploads is rejected with a ResourceExistsError.

This change brings the azure objstorage back to idempotence.

Fixes sentry error SWH-STORAGE-G6.

Details

Provenance
olasdAuthored on May 15 2020, 10:27 AM
olasdPushed on May 15 2020, 10:34 AM
Differential Revision
D3155: Handle TOCTOU in azure objstorage add()
Parents
rDOBJSf485201c2652: Fix pep8 violation
Branches
Unknown
Tags
Unknown
References
tag: v0.1.1
Build Status
Buildable 12398
Build 18809: test-and-buildJenkins console · Jenkins