REQUIRED主事务内多个NESTED次事务不提交事务bug (#531)

* 解决REQUIRED主事务内多个NESTED次事务不提交事务bug
This commit is contained in:
Alan-pan 2023-07-18 17:04:27 +08:00 committed by GitHub
parent 68a090fc99
commit b5417788d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,7 +220,8 @@ public class ConnectionFactory {
*/
public static boolean hasSavepoint(String xid) {
Map<String, List<SavePointHolder>> savePointMap = SAVEPOINT_CONNECTION_HOLDER.get();
return !CollectionUtils.isEmpty(savePointMap.get(xid));
List<SavePointHolder> savePointHolders = savePointMap.get(xid);
return !CollectionUtils.isEmpty(savePointHolders) && savePointHolders.stream().anyMatch(savePointHolder -> !CollectionUtils.isEmpty(savePointHolder.getSavePoints()));
}
}