# sql: transaction has already been committed or rolled back

- **ID:** `go/sql-tx-committed-twice`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

对已提交或回滚的事务再次调用Commit或Rollback

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.10 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   使用defer tx.Rollback()并检查Commit错误
   ```
2. **** (85% success)
   ```
   在Commit后设置标志位
   ```

## Dead Ends

- **** — 状态管理混乱，后续操作不可预测 (70% fail)
- **** — 如果Commit成功，Rollback会返回此错误 (80% fail)
