-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
pubsub: enable streaming pull #2212
pubsub: enable streaming pull #2212
Conversation
Moving this to a branch. If nothing else, we should perf test this before declaring it release-ready. This commit re-enables streaming pull. Unlike previous implementation, it does not fall back to polling if streaming is unavailable, since the streaming pull endpoint should be working by the time this is released. This commit fixes a bug deadline modification code. Previously we record an Instant we receive a message, then call Instant::getNano to get the time in nanoseconds. This is incorrect since getNano returns the nanosecond from the beginning of that second, not since an epoch. The fix is to simply save the time since epoch instead of Instant. This commit also slightly changes how errors are logged, so that errors that occur after the service is being shut down don't spam the console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidtorres can you take a look too?
} | ||
|
||
@Override | ||
protected void doStop() { | ||
// stopAllStreamingConnections(); | ||
stopAllStreamingConnections(); | ||
stopAllPollingConnections(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
ackDeadlineUpdater = | ||
executor.scheduleAtFixedRate( | ||
new Runnable() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Sorry I accidentally merged this. I've reset the branch and re-posted this at #2223 |
Moving this to a branch.
If nothing else, we should perf test this before
declaring it release-ready.
This commit re-enables streaming pull.
Unlike previous implementation,
it does not fall back to polling if streaming is unavailable,
since the streaming pull endpoint should be working
by the time this is released.
This commit fixes a bug deadline modification code.
Previously we record an Instant we receive a message,
then call Instant::getNano to get the time in nanoseconds.
This is incorrect since getNano returns the nanosecond
from the beginning of that second, not since an epoch.
The fix is to simply save the time since epoch instead of Instant.
This commit also slightly changes how errors are logged,
so that errors that occur after the service is being shut down
don't spam the console.