Reconnecting media that failed to be moved from source to destination on ADO persistence #226
Labels
enhancement
New feature or request
File processing
Everything is a file, even me.
queue workers
Ones taking the FI and doing the FO
queue
FIFO
VBO Actions
I got my head out the sunroof
Milestone
What?
So first a disclaimer (and this is on me many times, sorry). AWS SDK (s3) requires any file larger than 5 Gbytes to be uploaded via Multipart. We implement this correctly. But...
@alliomeria this is important!
...If your Archipelago (production) is Routing via minio an AWS S3 bucket instead of using it directly from AWS via S3FS, then Mini (a bug there) will incorrectly send a header to Amazon that is not in specs with the current API.
And uploading a temp file to its final destination (managed by Archipelago) will fail with this message in Minio:
If your storage is 100% managed by Mini, no issue, if your storage on the Drupal side of things is direct to AWS S3 no issue.
Ok, that said. Let's say your file was not correctly uploaded to
media/111/video-UUUID-verylarge.mp4
. For failsafe we will still "connect" it to the original source (to avoid total failure) and it will stay where it was (so you can still stream it) at e.g/media/upload/verylarge.mp4
. Issue with this? Well, if you delete your originals, all is broken for that file. But most importantly IIIF (cantaloupe) won't see it and won't be able to provide anything.In specific, this one here does the job on a normal operation:
https://github.com/esmero/strawberryfield/blob/ce3aae811900f49996a1b2bb631b64b602a004f2/src/EventSubscriber/StrawberryfieldEventPresaveSubscriberFilePersister.php#L107
calling this here:
https://github.com/esmero/strawberryfield/blob/main/src/StrawberryfieldFilePersisterService.php#L764-L883
The thing is, once we pass that stage (if we could/not could) we make the file permanent to avoid failure and that whole code will never run again, making (except via custom code/and manually copying things) re-establishing the Archipelago "we manage your file" contract impossible.
Now that we know the problem. Solution
What do we do?
Few options.
My only concern is: VBO. the files I saw fail today are 20Gbytes+. Not sure VBO will be able to do this in a run. So probably the VBO part will only do the "check if needs fixing" and then enqueue in the new AMI Action Queue to actually do the JOB.
Thanks
The text was updated successfully, but these errors were encountered: