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

capture write times to adjust lease timeout #99

Merged
merged 3 commits into from
Mar 19, 2018
Merged

capture write times to adjust lease timeout #99

merged 3 commits into from
Mar 19, 2018

Conversation

callmehiphop
Copy link
Contributor

@callmehiphop callmehiphop commented Mar 18, 2018

Fixes #83
Fixes #88

  • Tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Summary of Changes

Currently we "auto-lease" messages for the user, this means that we continuously modify the ackdeadline in an attempt to prevent messages being processed from being re-delivered. This involves setting a recursive timeout which is calculated like so

99th percentile of ack times * 0.9 * random (jitter)

However this doesn't account for any latency from writing to the subscription stream. This PR captures the time it takes to finish writing to a stream and adjusts the lease timeout accordingly.

@callmehiphop callmehiphop added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Mar 18, 2018
@codecov
Copy link

codecov bot commented Mar 19, 2018

Codecov Report

Merging #99 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #99   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           8      8           
  Lines         863    869    +6     
=====================================
+ Hits          863    869    +6
Impacted Files Coverage Δ
src/subscription.js 100% <100%> (ø) ⬆️
src/histogram.js 100% <100%> (ø) ⬆️

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 77b2d74...bf24796. Read the comment docs.

@callmehiphop callmehiphop removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Mar 19, 2018
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@callmehiphop callmehiphop merged commit c1485ec into googleapis:master Mar 19, 2018
This was referenced Mar 19, 2018
feywind pushed a commit to feywind/nodejs-pubsub that referenced this pull request Nov 12, 2024
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.

3 participants