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

fix: avoid HeadObject call for mc get #4947

Merged
merged 1 commit into from
May 31, 2024

Conversation

jiuker
Copy link
Contributor

@jiuker jiuker commented May 30, 2024

fix: avoid stat call for mc get

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

fix: avoid stat call for mc get
for #4866 deleted this feature.
Adding it back.

Motivation and Context

How to test this PR?

mc get source target
mc admin trace -v minio | grep s3.
You will see

127.0.0.1:9000 [REQUEST s3.GetObject] [2024-05-30T17:04:32.126] [Client IP: 127.0.0.1]
127.0.0.1:9000 Authorization: AWS4-HMAC-SHA256 Credential=minioadmin/20240530/wset/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=fc6e94b2677e4c11e177ff52a36ccb1e78640a47967a7dd16e1ba3567d4657b8

before this pr:

127.0.0.1:9000 [REQUEST s3.HeadObject] [2024-05-30T17:10:41.704] [Client IP: 127.0.0.1]
127.0.0.1:9000 Authorization: AWS4-HMAC-SHA256 Credential=minioadmin/20240530/wset/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=344706b6fadb7a7f5a1603cb521865fa1a28f399a4176c4e313a4f77ea6c5ec3
127.0.0.1:9000 [REQUEST s3.GetObject] [2024-05-30T17:10:41.706] [Client IP: 127.0.0.1]
127.0.0.1:9000 Authorization: AWS4-HMAC-SHA256 Credential=minioadmin/20240530/wset/s3/aws4_request, SignedHeaders=host;if-match;x-amz-content-sha256;x-amz-date, Signature=b0b6680e916d38e20fad674ab6e125f54f9fc7e877302675930f4888cc48b4a9

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

cmd/common-methods.go Outdated Show resolved Hide resolved
ramondeklein

This comment was marked as off-topic.

@jiuker jiuker marked this pull request as draft May 30, 2024 15:51
@minio minio deleted a comment from ramondeklein May 30, 2024
@minio minio deleted a comment from ramondeklein May 30, 2024
@minio minio deleted a comment from ramondeklein May 30, 2024
@minio minio deleted a comment from ramondeklein May 30, 2024
@jiuker jiuker marked this pull request as ready for review May 31, 2024 11:00
@jiuker jiuker changed the title fix: avoid stat call for mc get fix: avoid HeadObject call for mc get May 31, 2024
fix: avoid stat call for Get
@harshavardhana harshavardhana merged commit 3774027 into minio:master May 31, 2024
7 checks passed
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.

None yet

5 participants