world-postgres: startup recovery re-enqueues runs without a recorded namespace under the World's own prefix, not the registered flow handler's
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 50/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- postgresql, typescript
- 领域
- databases
调研方向
Start at the start() call in packages/world-postgres/src/index.ts, where the TODO points to this issue, and read reenqueueActiveRuns in @workflow/world to see how the fallback namespace is chosen. Find where the flow handler's in-process registration and its namespace are available before start(). Done when runs without a recorded namespace are re-enqueued under that handler's prefix, runs with a recorded namespace are unchanged, and the registration warning is still shown.
由索引模型根据 Issue 内容生成。
描述
Summary
On start(), the Postgres World re-enqueues every active run it owns (reenqueueActiveRuns from @workflow/world, called from packages/world-postgres/src/index.ts). A run goes back to the queue namespace it recorded when it was created; a run that recorded none goes to the World's own namespace (the namespace option, or WORKFLOW_QUEUE_NAMESPACE in the World's process).
Since #5315 the World delivers the Workflow SDK's messages in process, to the flow handler the app registered. That handler is registered under the prefix the flow route was built with (WORKFLOW_QUEUE_NAMESPACE at build time). When that prefix differs from the World's own, the World warns once at registration and still delivers what the SDK publishes, but the runs it recovers at startup without a recorded namespace go to its own prefix, which no handler in the process takes: the runner claims the job and fails the delivery.
Intended fix
Recover such runs under the registered flow handler's prefix rather than the World's namespace option: when a flow handler (one carrying the in-process entry) is registered before start(), pass its namespace as the fallback to reenqueueActiveRuns. Runs that recorded a namespace are unaffected.
Current state
The limitation is noted in the Postgres World docs (Programmatic configuration) and in the registration warning, and a TODO at the start() call in packages/world-postgres/src/index.ts points here.
Related: #2978 covers the wider question of isolating applications that share one database; this issue is only about the fallback namespace of recovery inside one application.
- 主要语言
- TypeScript
- 星标
- 2.5k
- 派生
- 401
- 平均合并
- 1 天 21 小时
- 30 天内合并 PR
- 201
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vercel/workflow 的其他 Issue
-
getPortLazy re-runs OS port discovery on every call when it finds no port可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
node-module-esbuild-plugin: getImportedIdentifier only checks the first named import when locating a violation可能已有人在做 @div-cowboy 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
vercel/workflow#5057 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
code-transform.mdx §ID Generation omits the package-shipped `name@version` ID form可能已有人在做 @Mohith26 于 114 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
feature request needs triage
难度 1/5 1-3 小时 新手友好度 69/100
-
难度 2/5 1-3 小时 新手友好度 88/100
HarperFast/symphony#91 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
solidjs/solid-docs#1716 ·
维护者通常 1 天内回复