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

オープン 初心者向け
#17,031 コメント 0 件 リアクション 0 件 担当者 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時間
マージ済み PR(30日)
148

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/grails-core のほかの issue

apache/grails-core の issue をすべて見る

似ている issue

Databases の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。