This is an automated email from the ASF dual-hosted git repository.
jianbin pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/develop by this push:
new ba7c771719 optimize: avoid dead loop logging during cache plan refresh
exceptions. (#6903)
ba7c771719 is described below
commit ba7c7717196223ca063e89459f04e3191cde2a90
Author: wuwen <[email protected]>
AuthorDate: Tue Oct 8 16:58:00 2024 +0800
optimize: avoid dead loop logging during cache plan refresh exceptions.
(#6903)
---
changes/en-us/develop.md | 1 +
changes/zh-cn/develop.md | 1 +
.../java/io/seata/rm/datasource/sql/struct/TableMetaCacheFactory.java | 2 ++
3 files changed, 4 insertions(+)
diff --git a/changes/en-us/develop.md b/changes/en-us/develop.md
index 334e1cdc0a..064525ddd2 100644
--- a/changes/en-us/develop.md
+++ b/changes/en-us/develop.md
@@ -22,6 +22,7 @@ Add changes here for all PR submitted to the develop branch.
### optimize:
- [[#6044](https://github.com/seata/seata/pull/6044)] optimize derivative
product check base on mysql
- [[#6361](https://github.com/seata/seata/pull/6361)] optimize 401 issues for
some links
+- [[#6903](https://github.com/apache/incubator-seata/pull/6903)] optimize
`tableMeta` cache scheduled refresh issue
### security:
- [[#PR_NO](https://github.com/seata/seata/pull/PR_NO)] A brief and accurate
description of PR
diff --git a/changes/zh-cn/develop.md b/changes/zh-cn/develop.md
index 15eedf9ea4..0f11f4a7a2 100644
--- a/changes/zh-cn/develop.md
+++ b/changes/zh-cn/develop.md
@@ -22,6 +22,7 @@
### optimize:
- [[#6044](https://github.com/seata/seata/pull/6044)] 优化MySQL衍生数据库判断逻辑
- [[#6361](https://github.com/seata/seata/pull/6361)] 优化部分链接 401 的问题
+- [[#6903](https://github.com/apache/incubator-seata/pull/6903)]
优化`tableMeta`缓存定时刷新问题
### security:
- [[#PR_NO](https://github.com/seata/seata/pull/PR_NO)] 准确简要的PR描述
diff --git
a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheFactory.java
b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheFactory.java
index f5c297cdd3..7a60692b7f 100644
---
a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheFactory.java
+++
b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheFactory.java
@@ -135,6 +135,8 @@ public class TableMetaCacheFactory {
}
} catch (Exception exx) {
LOGGER.error("table refresh error:{}",
exx.getMessage(), exx);
+ // Avoid high CPU usage due to infinite loops caused
by database exceptions
+ lastRefreshFinishTime = System.nanoTime();
}
}
});
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]