Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETag MD5 match issues #87

Closed
mzealey opened this issue Sep 15, 2023 · 1 comment
Closed

ETag MD5 match issues #87

mzealey opened this issue Sep 15, 2023 · 1 comment

Comments

@mzealey
Copy link

mzealey commented Sep 15, 2023

Most of our S3 uploads are having issues with etag vs md5 calcs being incorrect, for example:

time="2023-09-15T00:07:08Z" level=error msg="error deleting archive" archive_id=8315 count=1064179 error="archive md5: c881dde72956e6093c0c6ba422c9b9b0 and s3 etag: 7b40ab3cd948ed0d657b49c16f45f2eb do not match" org_id=25 period=D start="2023-06-08 00:00:00 +0000 UTC" type=message

It seems from https://docs.aws.amazon.com/AmazonS3/latest/API/API_Object.html that ETag is calculated quite differently depending on upload size, S3 encryption setting etc. I suspect having our buckets by default encrypted is causing this issue.

#45 seems a related issue.

In short I'm not sure that MD5 ETag checks are the correct way to go here. Perhaps it's worth adding a flag to make this check optional? Because actually for us, the danger of having too much stuff in the DB and not archived (causing space usage, slowdowns etc) is likely greater than the cost of loosing old history.

mzealey added a commit to moya-app/rp-archiver that referenced this issue Sep 15, 2023
Per nyaruka#87, S3 often generates ETag differently from pure MD5 hash which
means that database entries are not cleared.
mzealey added a commit to moya-app/rp-archiver that referenced this issue Sep 15, 2023
Per nyaruka#87, S3 often generates ETag differently from pure MD5 hash which
means that database entries are not cleared.
@rowanseymour
Copy link
Member

Addressed in #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants