René's URL Explorer Experiment


Title: Migration runner: chunked autocommit phases still run inside the mega-transaction · Issue #8410 · formbricks/formbricks · GitHub

Open Graph Title: Migration runner: chunked autocommit phases still run inside the mega-transaction · Issue #8410 · formbricks/formbricks

X Title: Migration runner: chunked autocommit phases still run inside the mega-transaction · Issue #8410 · formbricks/formbricks

Description: Summary packages/database/migration/20260625104904_canonicalize_language_codes/migration.ts's run() executes inside the migration runner's prisma.$transaction(..., { timeout: 30min }) callback. Steps 3 and 4 of the migration use the pris...

Open Graph Description: Summary packages/database/migration/20260625104904_canonicalize_language_codes/migration.ts's run() executes inside the migration runner's prisma.$transaction(..., { timeout: 30min }) callback. Ste...

X Description: Summary packages/database/migration/20260625104904_canonicalize_language_codes/migration.ts's run() executes inside the migration runner's prisma.$transaction(..., { timeout: 30min }) callb...

Opengraph URL: https://github.com/formbricks/formbricks/issues/8410

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Migration runner: chunked autocommit phases still run inside the mega-transaction","articleBody":"## Summary\n\n`packages/database/migration/20260625104904_canonicalize_language_codes/migration.ts`'s `run()` executes inside the migration runner's `prisma.$transaction(..., { timeout: 30min })` callback. Steps 3 and 4 of the migration use the `prisma` autocommit handle to commit chunked updates for `Response` and `ContactAttribute` (the two highest-volume tables), but this chunked work still runs *inside* the runner's outer transaction. As a result:\n\n- The chunked phases (steps 3–4) still consume the same 30-minute transaction budget as steps 1–2.\n- Locks acquired by steps 1–2 (on `Language`, `SurveyLanguage`, and `Survey` content rows) are held until `run()` returns, i.e. until steps 3–4 also finish.\n\n## Discussion / accepted trade-offs\n\nPer discussion on PR #8407 (review thread on `migration.ts` lines 29-32):\n\n- Response ingestion is not stalled by this: there's no `responseCount` column/trigger on `Survey`, and an insert's `KEY SHARE` lock on the `Survey` FK row is compatible with the content updates' `FOR NO KEY UPDATE` locks. What is blocked is survey *editing* during the migration — already true before this PR.\n- The timeout failure mode converges: committed chunks from steps 3–4 survive a transaction rollback/timeout, and retries re-walk mostly read-only ranges, so each retry attempt is progressively faster. Worst case is a crash-looping deploy that converges after a few attempts, not a stuck migration.\n\nGiven these mitigations, the PR author chose not to gate PR #8407 on this issue, but agreed it should be tracked as a follow-up.\n\n## Required changes\n\nEither:\n1. Add an opt-out in the migration runner (`packages/database/src/scripts/migration-runner.ts`) allowing a migration to declare that it should run partially or fully outside the mega-transaction, or\n2. Split this migration into two: a bounded-transaction migration for steps 1–2 (catalog + survey content), and a separate autocommit/chunked migration for steps 3–4 (`Response` + `ContactAttribute`).\n\n## Acceptance criteria\n\n- Chunked, high-volume update phases (Response/ContactAttribute canonicalization, and any future similar work) do not run inside the runner's long-lived transaction.\n- Locks from earlier bounded-transaction steps are released before chunked autocommit work begins.\n- Existing idempotency/retry behavior of the migration is preserved.\n\n## References\n\n- PR: https://github.com/formbricks/formbricks/pull/8407\n- Discussion: https://github.com/formbricks/formbricks/pull/8407#discussion_r3511286832\n\nRequested by: @xernobyl","author":{"url":"https://github.com/coderabbitai[bot]","@type":"Person","name":"coderabbitai[bot]"},"datePublished":"2026-07-02T09:27:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/8410/formbricks/issues/8410"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:446eab37-137c-2e17-a3a7-8849eb7542ea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB3C0:1F1E93:152F21E:1ED3AED:6A4BB35D
html-safe-nonce41abe2e23c710a298ed781e156c8c70f9609164a35a75b4c9bcccad6eb71b4c3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0MwOjFGMUU5MzoxNTJGMjFFOjFFRDNBRUQ6NkE0QkIzNUQiLCJ2aXNpdG9yX2lkIjoiNTkzMDAwMTUxNDE4MTE0NTQzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace6c398048142054a6643a98bc2f5154ea88bc0c26f1d70591c1801d563b00f25
hovercard-subject-tagissue:4793087499
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/formbricks/formbricks/8410/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9261312ae3bc42a7ff211bf3cae14d14427c42382c0b43e80b61cafc8980c6ef/formbricks/formbricks/issues/8410
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9261312ae3bc42a7ff211bf3cae14d14427c42382c0b43e80b61cafc8980c6ef/formbricks/formbricks/issues/8410
og:image:altSummary packages/database/migration/20260625104904_canonicalize_language_codes/migration.ts's run() executes inside the migration runner's prisma.$transaction(..., { timeout: 30min }) callback. Ste...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecoderabbitai[bot]
hostnamegithub.com
expected-hostnamegithub.com
Noneae1c14875555a1dd92bdef45baa6dd9aa796df891e4e471989f7117fe3139fc1
turbo-cache-controlno-preview
go-importgithub.com/formbricks/formbricks git https://github.com/formbricks/formbricks.git
octolytics-dimension-user_id105877416
octolytics-dimension-user_loginformbricks
octolytics-dimension-repository_id500289888
octolytics-dimension-repository_nwoformbricks/formbricks
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id500289888
octolytics-dimension-repository_network_root_nwoformbricks/formbricks
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
release68fba4ebcf15cde644b66de9a06e0a8582279435
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/formbricks/formbricks/issues/8410#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fformbricks%2Fformbricks%2Fissues%2F8410
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fformbricks%2Fformbricks%2Fissues%2F8410
Sign up https://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=formbricks%2Fformbricks
Reloadhttps://github.com/formbricks/formbricks/issues/8410
Reloadhttps://github.com/formbricks/formbricks/issues/8410
Reloadhttps://github.com/formbricks/formbricks/issues/8410
Please reload this pagehttps://github.com/formbricks/formbricks/issues/8410
formbricks https://github.com/formbricks
formbrickshttps://github.com/formbricks/formbricks
Notifications https://github.com/login?return_to=%2Fformbricks%2Fformbricks
Fork 2.4k https://github.com/login?return_to=%2Fformbricks%2Fformbricks
Star 12.5k https://github.com/login?return_to=%2Fformbricks%2Fformbricks
Code https://github.com/formbricks/formbricks
Issues 194 https://github.com/formbricks/formbricks/issues
Pull requests 22 https://github.com/formbricks/formbricks/pulls
Discussions https://github.com/formbricks/formbricks/discussions
Actions https://github.com/formbricks/formbricks/actions
Security and quality 1 https://github.com/formbricks/formbricks/security
Insights https://github.com/formbricks/formbricks/pulse
Code https://github.com/formbricks/formbricks
Issues https://github.com/formbricks/formbricks/issues
Pull requests https://github.com/formbricks/formbricks/pulls
Discussions https://github.com/formbricks/formbricks/discussions
Actions https://github.com/formbricks/formbricks/actions
Security and quality https://github.com/formbricks/formbricks/security
Insights https://github.com/formbricks/formbricks/pulse
Migration runner: chunked autocommit phases still run inside the mega-transactionhttps://github.com/formbricks/formbricks/issues/8410#top
https://github.com/apps/coderabbitai
coderabbitaihttps://github.com/apps/coderabbitai
on Jul 2, 2026https://github.com/formbricks/formbricks/issues/8410#issue-4793087499
#8407https://github.com/formbricks/formbricks/pull/8407
#8407https://github.com/formbricks/formbricks/pull/8407
fix: resolves feedback on the epic for language codes migration #8407https://github.com/formbricks/formbricks/pull/8407
fix: resolves feedback on the epic for language codes migration #8407 (comment)https://github.com/formbricks/formbricks/pull/8407#discussion_r3511286832
@xernobylhttps://github.com/xernobyl
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.