Skip to content

Conversation

crwilcox
Copy link
Contributor

Adds a ready event to BackgroundConsumer to allow waiting for the background thread to start

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 11, 2019
@crwilcox
Copy link
Contributor Author

crwilcox commented Mar 11, 2019

There exists a race of sorts where we thrash if we get retryable errors. Because it is possible to look at is_alive and it isn't. By adding this wait, and hardening is_active, this should be resolved.


[2019-03-08 05:16:41,878][139688736467728][][DEBUG][google.api_core.bidi][bidi.py:340][_on_call_done] Re-opening stream from gRPC callback.
[2019-03-08 05:16:41,884][139688736467728][][DEBUG][google.api_core.bidi][bidi.py:347][_reopen] Stream was already re-established.
[2019-03-08 05:16:41,886][139688736467728][][INFO][google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager][streaming_pull_manager.py:449][_should_recover] Observed recoverable stream error 503 channel is in state TRANSIENT_FAILURE
[2019-03-08 05:16:41,886][139688736467728][][DEBUG][google.api_core.bidi][bidi.py:340][_on_call_done] Re-opening stream from gRPC callback.
[2019-03-08 05:16:41,888][139688736467728][][INFO][google.api_core.bidi][bidi.py:372][_reopen] Re-established stream
[2019-03-08 05:16:41,889][139688736467728][][INFO][google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager][streaming_pull_manager.py:449][_should_recover] Observed recoverable stream error 503 channel is in state TRANSIENT_FAILURE
[2019-03-08 05:16:41,891][139688736467728][][DEBUG][google.api_core.bidi][bidi.py:340][_on_call_done] Re-opening stream from gRPC callback.
[2019-03-08 05:16:41,893][139688736467728][][INFO][google.api_core.bidi][bidi.py:372][_reopen] Re-established stream
[2019-03-08 05:16:41,893][139688738589456][][DEBUG][google.api_core.bidi][bidi.py:394][_recoverable] Call to retryable <bound method ResumableBidiRpc._recv of <google.api_core.bidi.ResumableBidiRpc object at 0x7f0bd1cf78d0>> caused 503 channel is in state TRANSIENT_FAILURE.
[2019-03-08 05:16:41,893][139688738589456][][INFO][google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager][streaming_pull_manager.py:449][_should_recover] Observed recoverable stream error 503 channel is in state TRANSIENT_FAILURE
[2019-03-08 05:16:41,894][139688738589456][][DEBUG][google.api_core.bidi][bidi.py:402][_recoverable] Re-opening stream from retryable <bound method ResumableBidiRpc._recv of <google.api_core.bidi.ResumableBidiRpc object at 0x7f0bd1cf78d0>>.
[2019-03-08 05:16:41,895][139688738589456][][INFO][google.api_core.bidi][bidi.py:372][_reopen] Re-established stream
[2019-03-08 05:16:41,895][139688736467728][][INFO][google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager][streaming_pull_manager.py:449][_should_recover] Observed recoverable stream error 503 channel is in state TRANSIENT_FAILURE
[2019-03-08 05:16:41,895][139688736467728][][DEBUG][google.api_core.bidi][bidi.py:340][_on_call_done] Re-opening stream from gRPC callback.
[2019-03-08 05:16:41,896][139688736467728][][DEBUG][google.api_core.bidi][bidi.py:347][_reopen] Stream was already re-established.

@crwilcox crwilcox force-pushed the add-start-guard-bidi branch from 6003b7a to d18c955 Compare March 11, 2019 23:18
@crwilcox crwilcox requested a review from tseaver March 12, 2019 18:23
@crwilcox crwilcox merged commit b95c8c7 into googleapis:master Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants