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

Send acknowledge/modifyAckDeadline requests in chunks #65

Merged
merged 1 commit into from
Feb 16, 2018
Merged

Send acknowledge/modifyAckDeadline requests in chunks #65

merged 1 commit into from
Feb 16, 2018

Conversation

ctavan
Copy link
Contributor

@ctavan ctavan commented Feb 13, 2018

The acknowledge and modifyAckDeadline API requests seem to have a size
limitation: If you send to many ackIds with one request you may get the
following error:

Request payload size exceeds the limit: 524288 bytes.

In order to prevent this error, make sure to always send those requests
in chunks that are small enough.

Fixes #62.

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

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot. The email used to register you as an authorized contributor must be the email used for the Git commit.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@codecov
Copy link

codecov bot commented Feb 13, 2018

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #65   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           8      8           
  Lines         845    849    +4     
=====================================
+ Hits          845    849    +4
Impacted Files Coverage Δ
src/subscription.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 7f855d6...1e43048. Read the comment docs.

@googlebot
Copy link

CLAs look good, thanks!

@ctavan
Copy link
Contributor Author

ctavan commented Feb 13, 2018

I'm happy to add test-cases to cover the chunking once we agree on an implementation.

@callmehiphop
Copy link
Contributor

@ctavan overall I think this LGTM, did this solve your issue? Any thoughts here @stephenplusplus?

@stephenplusplus
Copy link
Contributor

Looks okay to me. Did anyone try the system tests?

@ctavan
Copy link
Contributor Author

ctavan commented Feb 16, 2018

@callmehiphop @stephenplusplus I have not seen the error reported in #62 since running with this patched code while I was getting the error on the majority of service restarts before: So I'm pretty confident that it does what it's supposed to :).

Also, we've been running this in production for the last 4 days without any issues. Restarts of our services now no longer produce duplicates that we got due to failed acknowledge requests during service shutdowns.

@ctavan
Copy link
Contributor Author

ctavan commented Feb 16, 2018

Oh, I've also added 4 test cases for acknowledge_/modifyAckDeadline_ for the streaming/non-streaming cases respectively which cover the chunking behavior.

Would be great if this would land in the next release!

});
});
}
} else {

This comment was marked as spam.

This comment was marked as spam.

});
});
}
} else {

This comment was marked as spam.

This comment was marked as spam.

@callmehiphop
Copy link
Contributor

@ctavan looks like our lint task is failing - if you would be so kind as to run npm run prettier, I think that should fix it!

The acknowledge and modifyAckDeadline API requests seem to have a size
limitation: If you send to many ackIds with one request you may get the
following error:

```
Request payload size exceeds the limit: 524288 bytes.
```

In order to prevent this error, make sure to always send those requests
in chunks that are small enough.

Fixes #62.
@ctavan
Copy link
Contributor Author

ctavan commented Feb 16, 2018

@callmehiphop whoops, I should have checked linting, sorry for the additional loop.

Should be better now.

@callmehiphop
Copy link
Contributor

@ctavan no worries! I went ahead and ran all the system tests locally and they're all green, so I think we're good to go. Thanks again for the contribution!

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.

4 participants