-
Notifications
You must be signed in to change notification settings - Fork 2
Description
To reproduce:
- Submit a large cart with a low request timeout
- After timing out, continue to retry
- At some point, the early submit requests will complete
- The subsequent responses will not create a Download, or log anything obvious to explain the failure
- Multiple Downloads may appear for the requests submitted before the first completion
For example, was observed when timeout was 10 seconds for a max batch from icat.retriever. 3 retries were made, with two Downloads before prepare data was called. These two appeared in the admin table, the third retry returned JSON without a downloadId.
Suspect that this is in some way caused by the endpoint accepting multiple requests for the same cart, then at some point emptying the cart, and then the later Downloads not being created but no error is logged or returned. JSON is returned, but if downloadId is null it is not included in the body.
Ideally, it should not be possible to submit the same cart multiple times, but at the very least better logging is needed as it is not possible to workout what went wrong from the current levels of logging.