A flushed save of a plain class survives a failed tenant transaction

未关闭 适合新手
#17,031 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@ruthst00 已经在做这个了。

开始于 2026年11月19日。

  • #17075 来自 @ruthst00 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
groovy
领域
databases

调研方向

从 grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/AbstractGormApi.groovy 中 requireTransactionForWrite 的 flush 检查附近开始。追踪在 tenant 块内的普通类中,save(flush: true) 如何到达事务检查。重现报告的故障,并确认 tenant 事务失败后,名为 inner 的行不再存在。

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

描述

A flushed save of a plain class still survives when the tenant transaction fails.

Inside a tenant block, a transactional writer saves a plain class with a flush and then throws. The tenant transaction fails. The plain row is still in the default database. The flush returns before the check that the write has a transaction in its own datastore, so the save is neither rolled back nor refused.

The input is a plain class saved with save(flush: true) inside the tenant transaction, then an exception. The row named inner remains after the failure.

See grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/AbstractGormApi.groovy around the flush check in requireTransactionForWrite.

主要语言
Groovy
星标
2.9k
派生
980
平均合并
1 天 21 小时
30 天内合并 PR
148

环境准备

从这里开始

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

apache/grails-core 的其他 Issue

查看 apache/grails-core 的全部 Issue

相似的 Issue

更多 Databases Issue

把新 issue 发到你的邮箱

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