Skip to content

Fix spurious ERROR log on zombie transaction rollback#2978

Merged
lahma merged 1 commit into
3.xfrom
rollback-problem
Apr 3, 2026
Merged

Fix spurious ERROR log on zombie transaction rollback#2978
lahma merged 1 commit into
3.xfrom
rollback-problem

Conversation

@lahma

@lahma lahma commented Apr 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes Couldn't rollback ADO.NET connection. Transaction not connected, or was disconnected #2290 - users with clustered Quartz against MariaDB/MySQL see alarming ERROR logs: "Couldn't rollback ADO.NET connection. Transaction not connected, or was disconnected"
  • When a database connection is lost mid-operation, the transaction becomes disconnected (transaction.Connection == null). The rollback handler now detects this upfront and skips rollback with a Debug-level log, since the database has already aborted the transaction
  • Added unit tests for ConnectionAndTransactionHolder.Rollback() covering disconnected, connected, and null transaction scenarios

Test plan

  • New ConnectionAndTransactionHolderTest tests pass (3/3)
  • Full unit test suite passes (1051 passed, 0 failed)

🤖 Generated with Claude Code

When a database connection is lost mid-operation, the transaction becomes
disconnected (transaction.Connection == null). The rollback handler was
logging this at ERROR level, alarming users even though the system handles
it gracefully. Now detects disconnected transactions upfront and skips
rollback with a Debug-level log, since there is nothing to rollback when
the database has already aborted the transaction.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@lahma
lahma merged commit 148b0fe into 3.x Apr 3, 2026
12 of 13 checks passed
@lahma
lahma deleted the rollback-problem branch April 3, 2026 06:23
@sonarqubecloud

sonarqubecloud Bot commented Apr 3, 2026

Copy link
Copy Markdown

This was referenced Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant