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

gateway: add open flag when downloading an object #4507

Merged
merged 3 commits into from
Mar 14, 2024
Merged

gateway: add open flag when downloading an object #4507

merged 3 commits into from
Mar 14, 2024

Conversation

SandyXSD
Copy link
Contributor

@SandyXSD SandyXSD commented Mar 14, 2024

The GetObjectNInfo returns a GetObjectReader, which is used to read data, so we'd better add the 'ro' flag when opening the file.
Without it, the file reader is not properly closed, leading to memory leak in a short time (will be released after 1 min by the background check).

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 55.55%. Comparing base (4026264) to head (b55e949).
Report is 1 commits behind head on main.

Files Patch % Lines
cmd/object.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4507      +/-   ##
==========================================
- Coverage   55.58%   55.55%   -0.03%     
==========================================
  Files         157      157              
  Lines       42337    42337              
==========================================
- Hits        23531    23521      -10     
- Misses      16176    16183       +7     
- Partials     2630     2633       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SandyXSD SandyXSD requested a review from davies March 14, 2024 09:46
@davies davies merged commit c67e2b7 into main Mar 14, 2024
32 checks passed
@davies davies deleted the gateway-get branch March 14, 2024 10:06
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 this pull request may close these issues.

2 participants