I recently ran into an issue where write privs were revoked to a specific S3 datasource folder, the kill task logged errors for the S3 delete attempt but still deleted the druid_segment records.
A relatively simple improvement here might be to check for file existence after the delete attempt before deleting the metadata records ...?
Thanks. John