moodle-tool_objectfs icon indicating copy to clipboard operation
moodle-tool_objectfs copied to clipboard

Correctly handle intermittent issues connecting to s3

Open brendanheywood opened this issue 5 years ago • 0 comments

There is possibly 2 issues that overlap and make things worse.

The first issue is there is some intermittent reason why it cannot connect to s3. This is the root cause and being addressed elsewhere, but when it can't read a number of knock on effects happen:

  1. it can't read the file so the object ends up being set to OBJECT_LOCATION_ERROR

https://github.com/catalyst/moodle-tool_objectfs/blob/59a8783739b7e6a4865a56f46a030436cb71d96e/classes/local/store/object_file_system.php#L215-L225

This then heals later based on the cron recover task

  1. The file still ends up being served as a 200 which in many cases then gets cached in the browser. This must throw an exception and end up as a 40x or 50x so it will not be cached.

brendanheywood avatar Aug 19 '20 01:08 brendanheywood