This is an automated email from the ASF dual-hosted git repository.

funky-eyes pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git


The following commit(s) were added to refs/heads/2.x by this push:
     new a741d4be5e optimize: renew table meta cache entries during refresh 
(#8125)
a741d4be5e is described below

commit a741d4be5eda63a3dda00487e9c2e35d404f833c
Author: wuwen <[email protected]>
AuthorDate: Wed Jun 3 16:42:26 2026 +0800

    optimize: renew table meta cache entries during refresh (#8125)
---
 changes/en-us/2.x.md                                                  | 1 +
 changes/zh-cn/2.x.md                                                  | 1 +
 .../seata/rm/datasource/sql/struct/cache/AbstractTableMetaCache.java  | 4 ++--
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index 9cdb1687f5..2722d5c6c2 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -87,6 +87,7 @@ Add changes here for all PR submitted to the 2.x branch.
 - [[#8109](https://github.com/apache/incubator-seata/pull/8109)] reduce npmjs 
dependencies in saga module
 - [[#8112](https://github.com/apache/incubator-seata/pull/8112)] optimize 
seata-server test performance
 - [[#8116](https://github.com/apache/incubator-seata/pull/8116)] fix 
incompatible dependencies
+- [[#8125](https://github.com/apache/incubator-seata/pull/8125)] optimize: 
renew table meta cache entries during refresh
 
 ### security:
 
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index 285ccfc0e0..08af1db06b 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -89,6 +89,7 @@
 - [[#8109](https://github.com/apache/incubator-seata/pull/8109)] 精简 saga 模块 
npmjs 依赖
 - [[#8112](https://github.com/apache/incubator-seata/pull/8112)] 优化 
seata-server 测试性能
 - [[#8116](https://github.com/apache/incubator-seata/pull/8116)] 修复不兼容的依赖
+- [[#8125](https://github.com/apache/incubator-seata/pull/8125)] 
优化:在刷新期间更新表元数据缓存
 
 ### security:
 
diff --git 
a/rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/struct/cache/AbstractTableMetaCache.java
 
b/rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/struct/cache/AbstractTableMetaCache.java
index eff2a9ba05..9df51a9460 100755
--- 
a/rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/struct/cache/AbstractTableMetaCache.java
+++ 
b/rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/struct/cache/AbstractTableMetaCache.java
@@ -97,9 +97,9 @@ public abstract class AbstractTableMetaCache implements 
TableMetaCache {
                 try {
                     // Reuse tableNameForKey directly, no need to check again
                     TableMeta tableMeta = fetchSchema(connection, 
tableNameForKey);
+                    TABLE_META_CACHE.put(entry.getKey(), tableMeta);
                     if (!tableMeta.equals(entry.getValue())) {
-                        TABLE_META_CACHE.put(entry.getKey(), tableMeta);
-                        LOGGER.info("table meta change was found, update table 
meta cache automatically.");
+                        LOGGER.info("table meta cache refreshed automatically, 
table meta changes detected.");
                     }
                 } catch (SQLException e) {
                     LOGGER.error("get table meta error:{}", e.getMessage(), e);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to