Title: Publisher Client does not enter paused state before future.set_exception · Issue #1144 · googleapis/python-pubsub · GitHub
Open Graph Title: Publisher Client does not enter paused state before future.set_exception · Issue #1144 · googleapis/python-pubsub
X Title: Publisher Client does not enter paused state before future.set_exception · Issue #1144 · googleapis/python-pubsub
Description: For non-retriable errors returned from the backend, the client library currently sets future.set_exception() for all outstanding futures: python-pubsub/google/cloud/pubsub_v1/publisher/_batch/thread.py Lines 285 to 286 in 8c7e2a9 for fut...
Open Graph Description: For non-retriable errors returned from the backend, the client library currently sets future.set_exception() for all outstanding futures: python-pubsub/google/cloud/pubsub_v1/publisher/_batch/threa...
X Description: For non-retriable errors returned from the backend, the client library currently sets future.set_exception() for all outstanding futures: python-pubsub/google/cloud/pubsub_v1/publisher/_batch/threa...
Opengraph URL: https://github.com/googleapis/python-pubsub/issues/1144
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Publisher Client does not enter paused state before future.set_exception","articleBody":"For non-retriable errors returned from the backend, the client library currently sets future.set_exception() for all outstanding futures:\r\n\r\nhttps://github.com/googleapis/python-pubsub/blob/8c7e2a9e1b158e2b75dec8c5d78be17ce2dd449b/google/cloud/pubsub_v1/publisher/_batch/thread.py#L285-L286\r\n\r\n\r\nbefore it tries to change its state to paused by calling the _batch_done_callback():\r\nhttps://github.com/googleapis/python-pubsub/blob/8c7e2a9e1b158e2b75dec8c5d78be17ce2dd449b/google/cloud/pubsub_v1/publisher/_batch/thread.py#L289-L291\r\n\r\nThis results in race conditions where the callback associated with the future is invoked before the client enters paused state. Which causes issues if the callback attempts to do a resume_publish() before the client is in the paused state.","author":{"url":"https://github.com/mukund-ananthu","@type":"Person","name":"mukund-ananthu"},"datePublished":"2024-04-14T23:45:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1144/python-pubsub/issues/1144"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7f779f10-df4d-2f45-a537-c9900062c85f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E89C:2086C7:13BB69D:1B55BB2:6A4EA4FD |
| html-safe-nonce | bc5c6c56c9ee8d439e9e309f2cdd17130fe997621c8cce17a344320bef0ece5a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODlDOjIwODZDNzoxM0JCNjlEOjFCNTVCQjI6NkE0RUE0RkQiLCJ2aXNpdG9yX2lkIjoiODc5NzIzNDk1MjcxNjMzMDIzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dfcf229f818447be1a3d8779adfe3f496510f0d79209e54c78236a01866359de |
| hovercard-subject-tag | issue:2242431921 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-pubsub/1144/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3c6ac82528f95544a7bc9a6db8597c8997fd2777e993f3137c8d63d2492645b8/googleapis/python-pubsub/issues/1144 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3c6ac82528f95544a7bc9a6db8597c8997fd2777e993f3137c8d63d2492645b8/googleapis/python-pubsub/issues/1144 |
| og:image:alt | For non-retriable errors returned from the backend, the client library currently sets future.set_exception() for all outstanding futures: python-pubsub/google/cloud/pubsub_v1/publisher/_batch/threa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mukund-ananthu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-pubsub git https://github.com/googleapis/python-pubsub.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992581 |
| octolytics-dimension-repository_nwo | googleapis/python-pubsub |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992581 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-pubsub |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width