codingapi / codingapi/tx-lcn

5.0.2 LCN模式,补偿机制问题

Open
#343 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
4.2k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

```
public class LcnTransactionCleanService implements TransactionCleanService {

private final TCGlobalContext globalContext;

@Autowired
public LcnTransactionCleanService(TCGlobalContext globalContext) {
this.globalContext = globalContext;
}

@Override
public void clear(String groupId, int state, String unitId, String unitType) throws TransactionClearException {
try {
LcnConnectionProxy connectionProxy = globalContext.getLcnConnection(groupId);
connectionProxy.notify(state);
// todo notify exception
} catch (TCGlobalContextException e) {
log.warn("Non lcn connection when clear transaction.");
}
}
}
```
源码中,connectionProxy.notify(state) 里面实际上捕获了所有异常;
如果参与方等待通知时,数据库connection提交失败,那么是不是不会被记录需要补偿?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.