Skip to content

Commit

Permalink
bugfix: fix incorrect metric report (#6018)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptyin authored Nov 11, 2023
1 parent bc7d212 commit 93a7fa1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion changes/en-us/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The version is updated as follows:
- [[#5954](https://github.com/seata/seata/pull/5954)] fix the issue of saved branch session status does not match the actual branch session status
- [[#5990](https://github.com/seata/seata/pull/5990)] fix the issue that the Lua script is not synchronized when the redis sentinel master node is down
- [[#5887](https://github.com/seata/seata/pull/5887)] fix global transaction hook repeat execute

- [[#6018](https://github.com/seata/seata/pull/6018)] fix incorrect metric report

### optimize:
- [[#5966](https://github.com/seata/seata/pull/5966)] decouple saga expression handling and remove evaluator package
Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5954](https://github.com/seata/seata/pull/5954)] 修复保存的分支会话状态与实际的分支会话状态不一致的问题
- [[#5990](https://github.com/seata/seata/pull/5990)] 修复redis sentinel master node 宕机时,lua脚本未同步的问题
- [[#5887](https://github.com/seata/seata/pull/5887)] 修复全局事务钩子重复执行
- [[#6018](https://github.com/seata/seata/pull/6018)] 修复错误的 metric 上报


### optimize:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static void endCommitted(GlobalSession globalSession, boolean retryGlobal
}
globalSession.end();
if (!DELAY_HANDLE_SESSION) {
MetricsPublisher.postSessionDoneEvent(globalSession, false, false);
MetricsPublisher.postSessionDoneEvent(globalSession, retryGlobal, false);
}
MetricsPublisher.postSessionDoneEvent(globalSession, IdConstants.STATUS_VALUE_AFTER_COMMITTED_KEY, true,
beginTime, retryBranch);
Expand Down Expand Up @@ -219,7 +219,7 @@ public static void endRollbacked(GlobalSession globalSession, boolean retryGloba
}
globalSession.end();
if (!DELAY_HANDLE_SESSION && !timeoutDone) {
MetricsPublisher.postSessionDoneEvent(globalSession, false, false);
MetricsPublisher.postSessionDoneEvent(globalSession, retryGlobal, false);
}
MetricsPublisher.postSessionDoneEvent(globalSession, IdConstants.STATUS_VALUE_AFTER_ROLLBACKED_KEY, true,
beginTime, retryBranch);
Expand Down Expand Up @@ -331,7 +331,7 @@ public static void forEach(Collection<GlobalSession> sessions, GlobalSessionHand
public static Boolean forEach(Collection<BranchSession> sessions, BranchSessionHandler handler) throws TransactionException {
return forEach(sessions, handler, false);
}

/**
* Foreach branch sessions.
*
Expand Down

0 comments on commit 93a7fa1

Please sign in to comment.