René's URL Explorer Experiment


Title: fix(engine): lockless waitpoint insert for batch items to eliminate lock contention by ericallam · Pull Request #3232 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(engine): lockless waitpoint insert for batch items to eliminate lock contention by ericallam · Pull Request #3232 · triggerdotdev/trigger.dev

X Title: fix(engine): lockless waitpoint insert for batch items to eliminate lock contention by ericallam · Pull Request #3232 · triggerdotdev/trigger.dev

Description: When processing batchTriggerAndWait items, each batch item was acquiring a Redis lock on the parent run to insert a TaskRunWaitpoint row. With high concurrency (processingConcurrency=50), this caused LockAcquisitionTimeoutError (880 errors/24h in prod), orphaned runs, and stuck parent runs. Since blockRunWithCreatedBatch already transitions the parent to EXECUTING_WITH_WAITPOINTS before items are processed, the per-item lock is unnecessary. The new blockRunWithWaitpointLockless method performs only the idempotent CTE insert and timeout scheduling without acquiring the lock.

Open Graph Description: When processing batchTriggerAndWait items, each batch item was acquiring a Redis lock on the parent run to insert a TaskRunWaitpoint row. With high concurrency (processingConcurrency=50), this caus...

X Description: When processing batchTriggerAndWait items, each batch item was acquiring a Redis lock on the parent run to insert a TaskRunWaitpoint row. With high concurrency (processingConcurrency=50), this caus...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/3232

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:3dd518ae-6ac5-b3a5-1dc7-1b1352374639
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE540:2FFF08:6128BD3:8220A2E:6AFAEB4A
html-safe-nonce47ca0aacb77558a87a09ce9f3408e8ef817934e16fe6208fd99afa1c35d58a92
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTQwOjJGRkYwODo2MTI4QkQzOjgyMjBBMkU6NkFGQUVCNEEiLCJ2aXNpdG9yX2lkIjoiNzY2NzU3NzQwMDQ3MjU2MjUwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac262fb1edf95b71da409920b1cdb3a54f88023c76195baf276bf0ffc92afef161
hovercard-subject-tagpull_request:3410364024
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/3232/files
twitter:imagehttps://avatars.githubusercontent.com/u/534?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/534?s=400&v=4
og:image:altWhen processing batchTriggerAndWait items, each batch item was acquiring a Redis lock on the parent run to insert a TaskRunWaitpoint row. With high concurrency (processingConcurrency=50), this caus...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release12fff95459b24b0f882a66698ee6a36a5934d247
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/3232/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F3232%2Ffiles
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%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F3232%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3232/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3232/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3232/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
ericallamhttps://github.com/ericallam
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
feature/tri-7837-batchtriggerandwait-lock-contention-on-parent-run-causeshttps://github.com/triggerdotdev/trigger.dev/tree/feature/tri-7837-batchtriggerandwait-lock-contention-on-parent-run-causes
Conversation 5 https://github.com/triggerdotdev/trigger.dev/pull/3232
Commits 2 https://github.com/triggerdotdev/trigger.dev/pull/3232/commits
Checks 45 https://github.com/triggerdotdev/trigger.dev/pull/3232/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/3232/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3232/files
fix(engine): lockless waitpoint insert for batch items to eliminate lock contention https://github.com/triggerdotdev/trigger.dev/pull/3232/files#top
Show all changes 2 commits https://github.com/triggerdotdev/trigger.dev/pull/3232/files
34c8400 fix(engine): lockless waitpoint insert for batch items to eliminate l… ericallam Mar 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3232/commits/34c8400681d889ae44324c128e77dcaba97a5259
d840332 try to fix flaky locking timeout test ericallam Mar 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3232/commits/d84033274d2e21f3a0021300943c7178751d552d
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/3232/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3232/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3232/files
fix-batch-waitpoint-lock-contention.md https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-67d6a64faa3bb381bf2602bf3cb01a8064c99dfc8566fb2a55ba59da276212f8
index.ts https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-d29236a78d70dd8a019a2ec308d8eab0eda9f5fbf116d19d5c99b8f573a1b5df
waitpointSystem.ts https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-18bdabc2533cc85221b94d4292bdd96c0e035ae336748f18ce978efb957c1efd
locking.test.ts https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-ae68959c4d0dd8aae4c608e568ff016cc6f7a03a89b867f0e6b959941010a9ba
.server-changes/fix-batch-waitpoint-lock-contention.mdhttps://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-67d6a64faa3bb381bf2602bf3cb01a8064c99dfc8566fb2a55ba59da276212f8
View file https://github.com/triggerdotdev/trigger.dev/blob/d84033274d2e21f3a0021300943c7178751d552d/.server-changes/fix-batch-waitpoint-lock-contention.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3232/{{ revealButtonHref }}
internal-packages/run-engine/src/engine/index.tshttps://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-d29236a78d70dd8a019a2ec308d8eab0eda9f5fbf116d19d5c99b8f573a1b5df
View file https://github.com/triggerdotdev/trigger.dev/blob/d84033274d2e21f3a0021300943c7178751d552d/internal-packages/run-engine/src/engine/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3232/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-d29236a78d70dd8a019a2ec308d8eab0eda9f5fbf116d19d5c99b8f573a1b5df
https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-d29236a78d70dd8a019a2ec308d8eab0eda9f5fbf116d19d5c99b8f573a1b5df
internal-packages/run-engine/src/engine/systems/waitpointSystem.tshttps://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-18bdabc2533cc85221b94d4292bdd96c0e035ae336748f18ce978efb957c1efd
View file https://github.com/triggerdotdev/trigger.dev/blob/d84033274d2e21f3a0021300943c7178751d552d/internal-packages/run-engine/src/engine/systems/waitpointSystem.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3232/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-18bdabc2533cc85221b94d4292bdd96c0e035ae336748f18ce978efb957c1efd
https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-18bdabc2533cc85221b94d4292bdd96c0e035ae336748f18ce978efb957c1efd
internal-packages/run-engine/src/engine/tests/locking.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-ae68959c4d0dd8aae4c608e568ff016cc6f7a03a89b867f0e6b959941010a9ba
View file https://github.com/triggerdotdev/trigger.dev/blob/d84033274d2e21f3a0021300943c7178751d552d/internal-packages/run-engine/src/engine/tests/locking.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3232/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-ae68959c4d0dd8aae4c608e568ff016cc6f7a03a89b867f0e6b959941010a9ba
https://github.com/triggerdotdev/trigger.dev/pull/3232/files#diff-ae68959c4d0dd8aae4c608e568ff016cc6f7a03a89b867f0e6b959941010a9ba
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3232/files
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.