apache / apache/incubator-seata

TransactionHook没有被正确clear

Open
#6,880 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

- [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

### Ⅰ. Issue Description

### Ⅱ. Describe what happened

1. 时刻1开启事务1,线程`[http-nio-8089-exec-14]`在添加`TransactionHook`,实现`afterRollback`方法。事务1成功提交。
2. 时刻2开启事务2,事务2异常回滚后,线程`[http-nio-8089-exec-14]`执行了`afterRollback`方法内逻辑。

```
Just paste your stack trace here!
```

### Ⅲ. Describe what you expected to happen

### Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. xxx
3. xxx
4. xxx

Minimal yet complete reproducer code (or URL to code):

### Ⅴ. Anything else we need to know?

### Ⅵ. Environment:

- JDK version(e.g. `java -version`):1.8
- Seata client/server version: 1.3
- Database version:mysql8.0
- OS(e.g. `uname -a`):
- Others:

Contributor guide

Open the contributing guide

Research direction

Start by tracing TransactionHook storage and cleanup through transaction commit and rollback paths, then reproduce the reported sequence with two transactions on the same thread. Done means a hook added to the first transaction is cleared after its successful commit and its afterRollback logic is not invoked when the second transaction rolls back.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.