Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

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 force-pushed the avoid_stat_call branch from 8df8fa3 to 7137a7a Compare May 31, 2024 10:59
@jiuker jiuker marked this pull request as ready for review May 31, 2024 11:00
@jiuker jiuker requested review from ramondeklein and shtripat 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
@jiuker jiuker force-pushed the avoid_stat_call branch from 6bb7a79 to 0680e29 Compare May 31, 2024 11:09
fix: avoid stat call for Get
@jiuker jiuker force-pushed the avoid_stat_call branch from 0680e29 to da184b0 Compare May 31, 2024 11:11
@harshavardhana harshavardhana merged commit 3774027 into minio:master May 31, 2024
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.

5 participants