Skip to content

Conversation

@shubham-up-47
Copy link
Contributor

@shubham-up-47 shubham-up-47 commented Jul 19, 2025

Moving the implementation logic of the method ParallelUploadFile from parallel_upload.cc file to connection_impl.cc file, so that tracing of storage:: ParallelUploadFile can be enabled (#12908).

Trace screenshot: https://screenshot.googleplex.com/AWvah5UaFipjD7u
Reference implementation: #15245


This change is Reviewable

@shubham-up-47 shubham-up-47 requested review from a team as code owners July 19, 2025 14:47
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Jul 19, 2025
@shubham-up-47 shubham-up-47 marked this pull request as draft July 19, 2025 14:59
@shubham-up-47 shubham-up-47 marked this pull request as ready for review July 19, 2025 19:09
@codecov
Copy link

codecov bot commented Jul 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.97%. Comparing base (855ac89) to head (079bbf1).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15289      +/-   ##
==========================================
- Coverage   92.97%   92.97%   -0.01%     
==========================================
  Files        2402     2402              
  Lines      217949   217996      +47     
==========================================
+ Hits       202641   202679      +38     
- Misses      15308    15317       +9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

scotthart
scotthart previously approved these changes Jul 24, 2025
Copy link
Member

@scotthart scotthart left a comment

Choose a reason for hiding this comment

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

Reviewed 10 of 10 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @bajajneha27)


google/cloud/storage/parallel_upload.h line 1210 at r2 (raw file):

    });
  }
  return internal::ClientImplDetails::GetConnection(client)

Consider calling GetConnection before shard creation and save the connection pointer in a local var. This would allow you to continue to std::move(client) when calling CreateParallelUploadShards.

Or, move the shard creation and shard.Upload code to the new ExecuteParallelUploadFile function as well. Ideally, only the code that is dependent on the template parameters should exist in the .h file.

@shubham-up-47
Copy link
Contributor Author

Reviewed 10 of 10 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @bajajneha27)

google/cloud/storage/parallel_upload.h line 1210 at r2 (raw file):

    });
  }
  return internal::ClientImplDetails::GetConnection(client)

Consider calling GetConnection before shard creation and save the connection pointer in a local var. This would allow you to continue to std::move(client) when calling CreateParallelUploadShards.

Or, move the shard creation and shard.Upload code to the new ExecuteParallelUploadFile function as well. Ideally, only the code that is dependent on the template parameters should exist in the .h file.

Done.

@shubham-up-47 shubham-up-47 merged commit 677354c into googleapis:main Jul 31, 2025
78 of 79 checks passed
@shubham-up-47 shubham-up-47 deleted the otel_traces_for_parallel_upload_file branch July 31, 2025 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants