loopbackio / loopbackio/loopback-connector-postgresql

Release called on client which has already been released to the pool

未关闭
#493 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
JavaScript
星标
118
派生
184
平均合并
1 天 22 小时
30 天内合并 PR
5

描述

Steps to reproduce

  1. Use loopback-connector-postgresql 5.5.0 (5.4.0 does not exhibit this issue)
  2. Commit a transaction with an error (ex: unique key violation)
  3. Rollback the transaction

Current Behavior

Calling transaction.commit and subsequently transaction.rollback if there is a commit error results in:

The following error from pg-pool in the rollback is uncaught and crashes the server: Release called on client which has already been released to the pool

I would expect the error to be caught (perhaps in PostgreSQL.prototype.releaseConnection?) and passed along without crashing the server

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 PostgreSQL.prototype.releaseConnection 开始,使用 loopback-connector-postgresql 5.5.0 重现事务提交错误,随后执行回滚。将回滚路径与 pg-pool 的 release 行为进行比较;当 release 错误被捕获并传递出去且不会导致服务器崩溃时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, nodejs, postgresql
领域
backend, databases
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。