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

jimin 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 3495837891 bugfix: fix SerialArray equals() method for 
multi-dimensional array comparison (#7471)
3495837891 is described below

commit 349583789104409b913f8c6fee9ab67c86da4fb2
Author: SANGHUN OH <[email protected]>
AuthorDate: Mon Sep 29 16:10:32 2025 +0900

    bugfix: fix SerialArray equals() method for multi-dimensional array 
comparison (#7471)
---
 changes/en-us/2.x.md                                                  | 2 ++
 changes/zh-cn/2.x.md                                                  | 2 ++
 .../java/org/apache/seata/rm/datasource/sql/serial/SerialArray.java   | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index 30060e2586..3559797787 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -29,6 +29,7 @@ Add changes here for all PR submitted to the 2.x branch.
 
 ### bugfix:
 
+- [[#6476](https://github.com/apache/seata/issues/6476)] Fix SerialArray 
equals() method for multi-dimensional array comparison in Phase 2 rollback
 - [[#7482](https://github.com/apache/incubator-seata/pull/7482)] Github Action 
workflow does not run the corresponding Kotlin test
 - [[#7538](https://github.com/apache/incubator-seata/pull/7538)] unify 
DmdbTimestamp comparison via UTC Instant to prevent rollback failure
 - [[#7546](https://github.com/seata/seata/pull/7546)] fix client spring 
version compatible
@@ -98,6 +99,7 @@ Thanks to these contributors for their code commits. Please 
report an unintended
 - [keepConcentration](https://github.com/keepConcentration)
 - [sunheyi6](https://github.com/sunheyi6)
 - [WangzJi](https://github.com/WangzJi)
+- [unifolio0](https://github.com/unifolio0)
 - [Asuka-star](https://github.com/Asuka-star)
 - [YoWuwuuuw](https://github.com/YoWuwuuuw)
 - [psxjoy](https://github.com/psxjoy)
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index f8c9e403b7..2b3e1ca073 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -30,6 +30,7 @@
 
 ### bugfix:
 
+- [[#6476](https://github.com/apache/seata/issues/6476)] 修复SerialArray 
equals()方法在二阶段回滚中多维数组比较的问题
 - [[#7482](https://github.com/apache/incubator-seata/pull/7482)] Github Action 
工作流未运行相应的 Kotlin 测试
 - [[#7538](https://github.com/apache/incubator-seata/pull/7538)] 
统一DmdbTimestamp比较方式,通过UTC比较,以防止回滚失败
 - [[#7546](https://github.com/seata/seata/pull/7546)] 修复客户端spring版本兼容
@@ -101,6 +102,7 @@
 - [keepConcentration](https://github.com/keepConcentration)
 - [sunheyi6](https://github.com/sunheyi6)
 - [WangzJi](https://github.com/WangzJi)
+- [unifolio0](https://github.com/unifolio0)
 - [Asuka-star](https://github.com/Asuka-star)
 - [YoWuwuuuw](https://github.com/YoWuwuuuw)
 - [psxjoy](https://github.com/psxjoy)
diff --git 
a/rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/serial/SerialArray.java
 
b/rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/serial/SerialArray.java
index a9d686aa4d..63bd99a76f 100644
--- 
a/rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/serial/SerialArray.java
+++ 
b/rm-datasource/src/main/java/org/apache/seata/rm/datasource/sql/serial/SerialArray.java
@@ -173,13 +173,13 @@ public class SerialArray implements java.sql.Array, 
java.io.Serializable {
             SerialArray sa = (SerialArray) obj;
             return baseType == sa.baseType
                     && baseTypeName.equals(sa.baseTypeName)
-                    && Arrays.equals(elements, sa.elements);
+                    && Arrays.deepEquals(elements, sa.elements);
         }
         return false;
     }
 
     @Override
     public int hashCode() {
-        return (((31 + Arrays.hashCode(elements)) * 31 + len) * 31 + baseType) 
* 31 + baseTypeName.hashCode();
+        return (((31 + Arrays.deepHashCode(elements)) * 31 + len) * 31 + 
baseType) * 31 + baseTypeName.hashCode();
     }
 }


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

Reply via email to