chore(file-search): retire legacy index storage - #8014
icecrasher321 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| @@ -0,0 +1,7 @@ | |||
| SET LOCAL lock_timeout = '2s'; | |||
There was a problem hiding this comment.
On fresh installs or deployments migrating from before 0365, earlier pending migrations execute COMMIT, ending Drizzle’s transaction without starting another. This makes SET LOCAL ineffective and causes the two table drops to commit separately. If the second drop fails because of a dependency or lock conflict, the segment table remains permanently dropped instead of both changes rolling back atomically. Ensure this retirement runs inside an explicit transaction.
There was a problem hiding this comment.
1 issue found across 9 files
Confidence score: 4/5
packages/db/migrations/0368_retire_legacy_file_search.sqlappliesSET LOCALafterCOMMIT, so the setting is ignored by the real migration runner and the drops retain the 5-second timeout instead of 2 seconds; use a session-levelSETor wrap the statements in a transaction.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/db/migrations/0368_retire_legacy_file_search.sql">
<violation number="1" location="packages/db/migrations/0368_retire_legacy_file_search.sql:1">
P2: When the real runner applies this post-`COMMIT` migration, `SET LOCAL` runs outside a transaction and is ignored, so the drops use the runner's 5-second timeout instead of 2 seconds. Use a session-level `SET` or wrap the drops in an explicit transaction.</violation>
</file>
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Fix all with cubic | Re-trigger cubic
| @@ -0,0 +1,7 @@ | |||
| SET LOCAL lock_timeout = '2s'; | |||
There was a problem hiding this comment.
P2: When the real runner applies this post-COMMIT migration, SET LOCAL runs outside a transaction and is ignored, so the drops use the runner's 5-second timeout instead of 2 seconds. Use a session-level SET or wrap the drops in an explicit transaction.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/db/migrations/0368_retire_legacy_file_search.sql, line 1:
<comment>When the real runner applies this post-`COMMIT` migration, `SET LOCAL` runs outside a transaction and is ignored, so the drops use the runner's 5-second timeout instead of 2 seconds. Use a session-level `SET` or wrap the drops in an explicit transaction.</comment>
<file context>
@@ -0,0 +1,7 @@
+SET LOCAL lock_timeout = '2s';
+--> statement-breakpoint
+-- migration-safe: contract of #7947; deployed app, workers, and revision triggers use chunk storage. Retire only after the rollback window and completed backfill verification.
</file context>
| SET LOCAL lock_timeout = '2s'; | |
| SET lock_timeout = '2s'; |
Summary
Type of Change
Testing
Checklist