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

[Enhancement]aws sdk get/put object support zero copy #49709

Merged
merged 4 commits into from
Aug 14, 2024

Conversation

zombee0
Copy link
Contributor

@zombee0 zombee0 commented Aug 12, 2024

Why I'm doing:

perf_ssb100g_oss

What I'm doing:

largely reduced memory copy.
perf_aws_zero

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

Documentation PRs only:

If you are submitting a PR that adds or changes English documentation and have not
included Chinese documentation, then you can check the box to request GPT to translate the
English doc to Chinese. Please ensure to uncheck the Do not translate box if translation is needed.
The workflow will generate a new PR with the Chinese translation after this PR is merged.

  • Yes, translate English markdown files with GPT
  • Do not translate

Signed-off-by: zombee0 <ewang2027@gmail.com>
@zombee0 zombee0 requested a review from a team as a code owner August 12, 2024 07:23
Signed-off-by: zombee0 <ewang2027@gmail.com>
Signed-off-by: zombee0 <ewang2027@gmail.com>
body.read(static_cast<char*>(out), count);
_offset += body.gcount();
return body.gcount();
_offset += real_length;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not reuse outcome.GetResult().GetBody().gcount()? Can we make sure it always equal to real_length?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iostream's gcount is set after extract operation(like read), we didn't call read at all(we used to call body.read(xxx), and we can set the correct offset even if we had a wrong range #49692)

Copy link
Contributor

@DorianZheng DorianZheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment. rest LGTM

trueeyu
trueeyu previously approved these changes Aug 13, 2024
Signed-off-by: zombee0 <ewang2027@gmail.com>
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[BE Incremental Coverage Report]

pass : 17 / 18 (94.44%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/io/s3_input_stream.cpp 7 8 87.50% [61]
🔵 be/src/io/s3_output_stream.cpp 2 2 100.00% []
🔵 be/src/io/s3_zero_copy_iostream.h 8 8 100.00% []

@DorianZheng DorianZheng enabled auto-merge (squash) August 14, 2024 11:32
@DorianZheng DorianZheng merged commit d853c9c into StarRocks:main Aug 14, 2024
47 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.

4 participants