Skip to content

Commit cec5edf

Browse files
authored
optimize: avoid dead loop logging during cache plan refresh exceptions (#6806)
1 parent cd2e6d2 commit cec5edf

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

changes/en-us/2.x.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Add changes here for all PR submitted to the 2.x branch.
7777
- [[#6793](https://github.com/apache/incubator-seata/pull/6793)] fix npmjs conflicts
7878
- [[#6793](https://github.com/apache/incubator-seata/pull/6795)] optimize the initialization logic for server meta
7979
- [[#6794](https://github.com/apache/incubator-seata/pull/6794)] optimize NacosMockTest UT case
80+
- [[#6806](https://github.com/apache/incubator-seata/pull/6806)] optimize `tableMeta` cache scheduled refresh issue
8081

8182

8283
### refactor:

changes/zh-cn/2.x.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
- [[#6793](https://github.com/apache/incubator-seata/pull/6793)] 修复 npmjs 依赖冲突问题
7979
- [[#6794](https://github.com/apache/incubator-seata/pull/6794)] 优化 NacosMockTest 单测问题
8080
- [[#6793](https://github.com/apache/incubator-seata/pull/6795)] 独立server的meta信息初始化逻辑
81+
- [[#6806](https://github.com/apache/incubator-seata/pull/6806)] 优化`tableMeta`缓存定时刷新问题
8182

8283

8384
### refactor:

rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/struct/TableMetaCacheFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ static class TableMetaRefreshHolder {
135135
}
136136
} catch (Exception exx) {
137137
LOGGER.error("table refresh error:{}", exx.getMessage(), exx);
138+
// Avoid high CPU usage due to infinite loops caused by database exceptions
139+
lastRefreshFinishTime = System.nanoTime();
138140
}
139141
}
140142
});

0 commit comments

Comments
 (0)