data-store
data-store copied to clipboard
[Spike] Prevent multiple concurrent checkout jobs
This is an experimental solution to the following problem: If multiple clients initiate GET requests against the same file, a checkout job will be initiated for each client.
This mechanism:
- Places a marker in a DynamoDB table when a file checkout job is started
- On subsequent requests: - If object exists in checkout bucket, return as usual - If not, check for marker. If marker exists, do not start new checkout job
- Marker is deleted upon checkout success.
- If checkout fails, marker contains the exception.