Error when using transaction timeout
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, node.js, postgresql
调研方向
使用 loopback-connector-postgresql 5.3.0 和 Node v14.1.0 重现事务超时,然后检查第 124 行的 node_modules/loopback-connector/lib/transaction.js 及其周围的超时处理逻辑。完成的标准是超时路径不再引发“tx.notifyObserversOf is not a function”或导致应用崩溃。
由索引模型根据 Issue 内容生成。
描述
Steps to reproduce
loopback-connector-postgresql version is 5.3.0
node version is v14.1.0
await app.datasources.db.transaction(async myTxModels => {
await customFunction(element, {
db1: db1TxModels,
db2: db2Models
}).catch(err => { throw err });
}, { timeout: 240000 });
Current Behavior
aftersome time, app crashes with the following error
tx.notifyObserversOf('timeout', context, function(err) {
^
TypeError: tx.notifyObserversOf is not a function
at Timeout._onTimeout (\node_modules\loopback-connector\lib\transaction.js:124:12)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
- 主要语言
- JavaScript
- 星标
- 118
- 派生
- 183
- 平均合并
- 3 天 7 小时
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
loopbackio/loopback-connector-postgresql 的其他 Issue
-
Partial JSON Update可能已有人在做 @vaibhavbhalla2505 于 264 天前认领。 未关闭feature
难度 5/5 一周以上 新手友好度 20/100
-
bug
难度 4/5 3-5 天 新手友好度 30/100
loopbackio/loopback-connector-postgresql#748 · 1 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 38/100
-
bug
难度 4/5 3-5 天 新手友好度 25/100
-
bug
难度 2/5 1-3 小时 新手友好度 45/100
loopbackio/loopback-connector-postgresql#732 · 1 条评论 ·
查看 loopbackio/loopback-connector-postgresql 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
jspreadsheet/ce#1809 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
githubnext/gh-aw-workshop#4458 ·
维护者通常 1 天内回复
-
Add: Cartoonito未关闭check:failed feeds:add
难度 2/5 1-3 小时 新手友好度 63/100
iptv-org/database#37390 · 1 条评论 ·
维护者通常 9 天内回复
-
bug: directory index route root priority is overwritten when wildcard is false可能已有人在做 @TalhaHunter101 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
fastify/fastify-static#617 ·
-
bug confirmed css v6
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复