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

S3 extension misuses AWS SDK to get content size #93

Open
zyga opened this issue Oct 2, 2023 · 0 comments · May be fixed by #94
Open

S3 extension misuses AWS SDK to get content size #93

zyga opened this issue Oct 2, 2023 · 0 comments · May be fixed by #94

Comments

@zyga
Copy link

zyga commented Oct 2, 2023

Getting the content size should not happen with s3Object.getObjectMetadata as that is too late, and we're already GETting the whole blob needlessly.

From my local patch:

+        var req = new GetObjectMetadataRequest(s3Properties.getBucketName(), key);
+        var objMeta = amazonS3.getObjectMetadata(req);

This way we can get the meta-data in a simple HEAD request, which is not wasting bandwidth.

zyga added a commit to zyga/hawkbit-extensions that referenced this issue Oct 2, 2023
This fixes one of the two cases where S3 APIs were used incorrectly, causing
extensive misuse of bandwidth between HawkBit and S3.

Fixes: eclipse#93
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
@zyga zyga linked a pull request Oct 2, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant