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(pubsub): limit ModifyAckDeadlineRequest size #10032

Merged

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Oct 11, 2022

Pub/Sub sets a quota of 512KB for ModifyAckDeadlineRequest messages. Theoretically we could have gone over that limit, for example, if the application had thousands of messages in memory, and we needed to extend their leases. With this change such requests will be broken into multiple RPCs.

It also sets a quota for AcknowledgeRequest messages, but always send a single ack_id in this case, there is no chance to go over the limit.

Fixes #9471


This change is Reviewable

Pub/Sub sets a quota of 512KB for `ModifyAckDeadlineRequest` messages.
Theoretically we could have gone over that limit, for example, if the
application had thousands of messages in memory, and we needed to
extend their leases.  With this change such requests will be broken
into multiple RPCs.

It also sets a quota for `AcknowledgeRequest` messages, but always send
a single `ack_id` in this case, there is no chance to go over the
limit.
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Oct 11, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: e86c5250c75343a70838f3ae49d8699b28ed9841

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

@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Base: 94.22% // Head: 94.22% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (c608ca4) compared to base (ede8ae1).
Patch coverage: 97.76% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #10032    +/-   ##
========================================
  Coverage   94.22%   94.22%            
========================================
  Files        1522     1522            
  Lines      141402   141576   +174     
========================================
+ Hits       133233   133404   +171     
- Misses       8169     8172     +3     
Impacted Files Coverage Δ
...sub/internal/streaming_subscription_batch_source.h 100.00% <ø> (ø)
...ternal/streaming_subscription_batch_source_test.cc 99.42% <96.87%> (-0.45%) ⬇️
...ub/internal/streaming_subscription_batch_source.cc 97.77% <100.00%> (+0.32%) ⬆️
...e/cloud/pubsublite/internal/alarm_registry_impl.cc 97.05% <0.00%> (-2.95%) ⬇️
google/cloud/storage/parallel_upload.cc 98.28% <0.00%> (-0.35%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 97.82% <0.00%> (-0.17%) ⬇️
google/cloud/completion_queue_test.cc 97.32% <0.00%> (+0.19%) ⬆️
...integration_tests/schema_admin_integration_test.cc 100.00% <0.00%> (+1.11%) ⬆️
google/cloud/internal/async_connection_ready.cc 93.61% <0.00%> (+4.25%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: da469d92ff6d32237d9dfd9d12650d7ecbc8244f

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

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: c608ca4fa36d0603ebb8daef5e61103a59221bc5

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

@coryan coryan marked this pull request as ready for review October 12, 2022 01:14
@coryan coryan requested a review from a team as a code owner October 12, 2022 01:14
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 1 of 3 files at r1, 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @coryan)

@coryan coryan merged commit d5ca4a7 into googleapis:main Oct 12, 2022
@coryan coryan deleted the fix-pubsub-limit-ModifyAckDeadlineRequest-size branch October 12, 2022 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cap the number of ack ids when extending leases
3 participants