Content-Length: 264146 | pFad | https://github.com/googleapis/google-cloud-go/issues/11214

BF fix(pubsub): convert stream ack deadline seconds from duration by hongalex · Pull Request #11214 · googleapis/google-cloud-go · GitHub
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): convert stream ack deadline seconds from duration #11214

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

hongalex
Copy link
Member

@hongalex hongalex commented Dec 3, 2024

Fixes #10557

@hongalex hongalex requested review from shollyman and a team as code owners December 3, 2024 19:59
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Dec 3, 2024
@@ -893,7 +893,7 @@ func (it *messageIterator) pingStream() {
spr := &pb.StreamingPullRequest{}
it.eoMu.RLock()
if it.sendNewAckDeadline {
spr.StreamAckDeadlineSeconds = int32(it.ackDeadline())
spr.StreamAckDeadlineSeconds = int32(it.ackDeadline()) / int32(time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be more readable to use https://pkg.go.dev/time#Duration.Seconds and cast from there, rather than doing unit division.

@hongalex hongalex enabled auto-merge (squash) December 4, 2024 20:50
@hongalex hongalex merged commit b2b05e4 into googleapis:main Dec 4, 2024
7 checks passed
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.

pubsub: updating ack deadline seconds in streaming pull behavior is wrong
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/google-cloud-go/issues/11214

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy