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

doc(storage): describe connection pool #7637

Merged
merged 2 commits into from
Nov 20, 2021

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Nov 19, 2021

Fixes #1554


This change is Reviewable

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 19, 2021
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Nov 19, 2021
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 29317978a93bd2c501b9899a670e535ce3c54e8c

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Nov 19, 2021

Codecov Report

Merging #7637 (4caf7fb) into main (72a9ed2) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7637      +/-   ##
==========================================
- Coverage   95.28%   95.27%   -0.01%     
==========================================
  Files        1251     1251              
  Lines      112992   112992              
==========================================
- Hits       107659   107658       -1     
- Misses       5333     5334       +1     
Impacted Files Coverage Δ
google/cloud/storage/client.h 99.79% <ø> (ø)
google/cloud/storage/internal/curl_handle.h 80.00% <0.00%> (-2.86%) ⬇️
.../cloud/storage/benchmarks/throughput_experiment.cc 74.37% <0.00%> (-0.51%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 97.75% <0.00%> (-0.50%) ⬇️
google/cloud/pubsub/samples/samples.cc 92.10% <0.00%> (+0.07%) ⬆️
...le/cloud/internal/default_completion_queue_impl.cc 97.60% <0.00%> (+0.59%) ⬆️
google/cloud/pubsub/subscriber_connection_test.cc 97.88% <0.00%> (+0.70%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72a9ed2...4caf7fb. Read the comment docs.

* new HTTPS session is relatively expensive, as it must go through the TCP/IP
* and SSL handshakes. To minimize this overhead the class maintains a
* connection pool to the service. After each request completes the connection
* is returned to the pool, and reuse in future requests. Note that for
Copy link
Member

Choose a reason for hiding this comment

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

s/reuse/reused/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

*
* The application can limit the maximum size of this connection pool using
* `storage::ConnectionPoolSizeOption`. If returning a connection to the pool
* would make the pool larger than this limit then the oldest connection in the
Copy link
Member

Choose a reason for hiding this comment

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

nit: Would "oldest inactive connection" be more accurate?

The paragraph below suggests that an active download will not be closed.

Your call on whether to update the text or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All connections in the pool are inactive ... and yes, active downloads are not closed (not while in progress).

Copy link
Member

Choose a reason for hiding this comment

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

hmm ok.

s/connecitons in the pool are inactivate/connections in the pool are inactive/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 35b9db0c0ac210b5e0a274488072097ff8bfb1e4

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

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.

Reviewable status: 0 of 1 files reviewed, 3 unresolved discussions (waiting on @coryan, @dbolduc, and @scotthart)


google/cloud/storage/client.h, line 84 at r2 (raw file):

inactivate

inactive

@coryan coryan force-pushed the doc-storage-describe-connection-pool branch from 35b9db0 to 4caf7fb Compare November 19, 2021 19:57
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 4caf7fb34b4278d2cd9aa7c05f60a100e8b737ff

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan marked this pull request as ready for review November 19, 2021 21:17
@coryan coryan requested a review from a team as a code owner November 19, 2021 21:17
Copy link
Contributor Author

@coryan coryan left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @dbolduc and @scotthart)


google/cloud/storage/client.h, line 84 at r2 (raw file):

Previously, scotthart (Scott Hart) wrote…
inactivate

inactive

Done.

@coryan coryan merged commit 75d5b33 into googleapis:main Nov 20, 2021
@coryan coryan deleted the doc-storage-describe-connection-pool branch November 20, 2021 15:06
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the connection pooling model in Cloud Storage library.
4 participants