René's URL Explorer Experiment


Title: Remove expired ack_ids from lease management. · Issue #786 · googleapis/python-pubsub · GitHub

Open Graph Title: Remove expired ack_ids from lease management. · Issue #786 · googleapis/python-pubsub

X Title: Remove expired ack_ids from lease management. · Issue #786 · googleapis/python-pubsub

Description: Possible root cause of: #593 Steps to reproduce High-latency subscriber (e.g. 2 hours) Low message count flow control Solution only works for exactly once delivery subscriptions, since they return invalid_ack_id errors. Code example def ...

Open Graph Description: Possible root cause of: #593 Steps to reproduce High-latency subscriber (e.g. 2 hours) Low message count flow control Solution only works for exactly once delivery subscriptions, since they return ...

X Description: Possible root cause of: #593 Steps to reproduce High-latency subscriber (e.g. 2 hours) Low message count flow control Solution only works for exactly once delivery subscriptions, since they return ...

Opengraph URL: https://github.com/googleapis/python-pubsub/issues/786

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove expired ack_ids from lease management.","articleBody":"Possible root cause of: https://github.com/googleapis/python-pubsub/issues/593\r\n\r\n#### Steps to reproduce\r\n\r\n  1. High-latency subscriber (e.g. 2 hours)\r\n  2. Low message count flow control\r\n  3. Solution only works for exactly once delivery subscriptions, since they return invalid_ack_id errors.\r\n\r\n#### Code example\r\n\r\n```\r\n\r\ndef f(x):\r\n    set_time = 60\r\n    timeout = time.time() + 60*float(set_time)  # X minutes from now\r\n    print(timeout)\r\n    while True:\r\n        if time.time() > timeout:\r\n            print(\"Time to ack!\")\r\n            print(time.time())\r\n            break\r\n        x * x\r\n\r\ndef create_load(percent_load):\r\n    processes = psutil.cpu_count()\r\n    to_use = int(processes * (percent_load/100))\r\n    print ('utilizing %d cores\\n' % to_use)\r\n    pool = Pool(to_use)\r\n    pool.map(f, range(to_use))\r\n\r\ndef receive_messages_with_flow_control() -> None:\r\n    \"\"\"Receives messages from a pull subscription with flow control.\"\"\"\r\n    from concurrent.futures import TimeoutError\r\n    from google.cloud import pubsub_v1\r\n\r\n    subscriber = pubsub_v1.SubscriberClient()\r\n    subscription_path = subscriber.subscription_path(project_id, subscription_id)\r\n\r\n    def callback(message: pubsub_v1.subscriber.message.Message) -> None:\r\n        print(f\"Received {message.data!r} at {time.time()}.\")\r\n        create_load(50)\r\n        message.ack()\r\n\r\n    # Limit the subscriber to only have ten outstanding messages at a time.\r\n    flow_control = pubsub_v1.types.FlowControl(max_messages=1)\r\n\r\n    streaming_pull_future = subscriber.subscribe(\r\n        subscription_path, callback=callback, flow_control=flow_control\r\n    )\r\n\r\n    # Wrap subscriber in a 'with' block to automatically call close() when done.\r\n    with subscriber:\r\n        try:\r\n            # When `timeout` is not set, result() will block indefinitely,\r\n            # unless an exception is encountered first.\r\n            streaming_pull_future.result()\r\n        except TimeoutError:\r\n            streaming_pull_future.cancel()  # Trigger the shutdown.\r\n            streaming_pull_future.result()  # Block until the shutdown is complete.\r\n```\r\n\r\n### Error trace:\r\n```\r\ngoogle.api_core.exceptions.InvalidArgument: 400 Some acknowledgement ids in the request were invalid. This could be because the acknowledgement ids have expired or the acknowledgement ids were malformed. [reason: \"EXACTLY_ONCE_ACKID_FAILURE\"\r\ndomain: \"pubsub.googleapis.com\"\r\nmetadata {\r\n  value: \"PERMANENT_FAILURE_INVALID_ACK_ID\"\r\n}\r\n```\r\n\r\nEven while flow control is activate and CPS client library does not receive messages in streaming_pull_manager._on_response, CPS still delivers messages to the bidi stream, which are buffered. These messages are not lease managed (because the library does not know about them) , so they expire before they are ever sent to a callback.\r\n\r\nWhen one of these expired messages is passed to _on_response, and a receipt modack is sent via send_lease_modacks, if we receive an EOD related INVALID_ACK_ID failure, we should not pass these messages on to be processed, as they are already expired.\r\n","author":{"url":"https://github.com/acocuzzo","@type":"Person","name":"acocuzzo"},"datePublished":"2022-09-21T19:54:12Z","url":"https://github.com/googleapis/python-pubsub/issues/786"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:66a62d5a-c04c-9733-ca50-2b3c30d0ca1b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAF6A:3E61F:25C846:342807:6AEC8B55
html-safe-nonce40166c1f2f9b5dc846b203ea53a03602b354ef5ba426ab904b0213e050f4c99d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjZBOjNFNjFGOjI1Qzg0NjozNDI4MDc6NkFFQzhCNTUiLCJ2aXNpdG9yX2lkIjoiNjc0NzQwOTMyNjIxMDMyMTIzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacff3949fce6bb41a165fc373d59833d880c65dd0fb6bbc47481d50f3da1816bb6
hovercard-subject-tagissue:1381422445
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-pubsub/786/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e93295599202e365099a3d76eb6a6bb1aae7585bec969bf7147369b87dbb9030/googleapis/python-pubsub/issues/786
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e93295599202e365099a3d76eb6a6bb1aae7585bec969bf7147369b87dbb9030/googleapis/python-pubsub/issues/786
og:image:altPossible root cause of: #593 Steps to reproduce High-latency subscriber (e.g. 2 hours) Low message count flow control Solution only works for exactly once delivery subscriptions, since they return ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameacocuzzo
hostnamegithub.com
expected-hostnamegithub.com
None9e71b15756bc4afd8519e1d2c309d0293587d17d6675d0f439cc304af9ed67ee
turbo-cache-controlno-preview
go-importgithub.com/googleapis/python-pubsub git https://github.com/googleapis/python-pubsub.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id226992581
octolytics-dimension-repository_nwogoogleapis/python-pubsub
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id226992581
octolytics-dimension-repository_network_root_nwogoogleapis/python-pubsub
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c2272d26b06ef11573649367fbbb67bfa00cd4f
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/googleapis/python-pubsub/issues/786#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-pubsub%2Fissues%2F786
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-pubsub%2Fissues%2F786
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fpython-pubsub
Reloadhttps://github.com/googleapis/python-pubsub/issues/786
Reloadhttps://github.com/googleapis/python-pubsub/issues/786
Reloadhttps://github.com/googleapis/python-pubsub/issues/786
googleapishttps://github.com/googleapis
python-pubsubhttps://github.com/googleapis/python-pubsub
Codehttps://github.com/googleapis/python-pubsub
Issueshttps://github.com/googleapis/python-pubsub/issues
Pull requestshttps://github.com/googleapis/python-pubsub/pulls
Actionshttps://github.com/googleapis/python-pubsub/actions
Projectshttps://github.com/googleapis/python-pubsub/projects
Security and qualityhttps://github.com/googleapis/python-pubsub/security
Insightshttps://github.com/googleapis/python-pubsub/pulse
https://github.com/googleapis/python-pubsub
#787https://github.com/googleapis/python-pubsub/pull/787
Remove expired ack_ids from lease management.https://github.com/googleapis/python-pubsub/issues/786#top
#787https://github.com/googleapis/python-pubsub/pull/787
https://github.com/acocuzzo
api: pubsubIssues related to the googleapis/python-pubsub API.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22api%3A%20pubsub%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/acocuzzo
acocuzzohttps://github.com/acocuzzo
on Sep 21, 2022https://github.com/googleapis/python-pubsub/issues/786#issue-1381422445
#593https://github.com/googleapis/python-pubsub/issues/593
acocuzzohttps://github.com/acocuzzo
on Sep 21, 2022https://github.com/googleapis/python-pubsub/issues/786#event-7433882214
product-auto-labelhttps://github.com/apps/product-auto-label
api: pubsubIssues related to the googleapis/python-pubsub API.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22api%3A%20pubsub%22
on Sep 21, 2022https://github.com/googleapis/python-pubsub/issues/786#event-7433882580
acocuzzohttps://github.com/acocuzzo
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
on Sep 21, 2022https://github.com/googleapis/python-pubsub/issues/786#event-7433884426
acocuzzohttps://github.com/acocuzzo
completedhttps://github.com/googleapis/python-pubsub/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#787https://github.com/googleapis/python-pubsub/pull/787
on Sep 22, 2022https://github.com/googleapis/python-pubsub/issues/786#event-7441326703
Sign up for freehttps://github.com/signup?return_to=https://github.com/googleapis/python-pubsub/issues/786
Sign in to commenthttps://github.com/login?return_to=https://github.com/googleapis/python-pubsub/issues/786
acocuzzohttps://github.com/acocuzzo
api: pubsubIssues related to the googleapis/python-pubsub API.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22api%3A%20pubsub%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-pubsub/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.