Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: in dubbo 3.x version, the consumer can't generate tcc proxy. #6101

Merged
merged 27 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ef782b3
undo_log table check optimize
laywin Nov 14, 2023
1df81eb
optimize & add modify record
laywin Nov 14, 2023
8e92325
adjust indentation
laywin Nov 14, 2023
7482281
undo_log table check optimize
laywin Nov 14, 2023
522c386
optimize & add modify record
laywin Nov 14, 2023
0444780
adjust indentation
laywin Nov 14, 2023
881aaf4
add unit test
laywin Nov 21, 2023
b8f822c
move pr record
laywin Nov 21, 2023
fc2e79f
Merge remote-tracking branch 'origin/2.x' into 2.x
laywin Nov 21, 2023
e36326e
modify unit test
laywin Nov 21, 2023
0bf3847
add Github ID
laywin Nov 23, 2023
47d150d
Merge branch '2.x' into 2.x
funky-eyes Nov 25, 2023
12f8109
1. update mockito version to 4.5.1 same as seata server to support st…
laywin Nov 26, 2023
c8a6115
Merge remote-tracking branch 'origin/2.x' into 2.x
laywin Nov 26, 2023
c5761c7
import optimize
laywin Nov 26, 2023
572192b
1. add dubbo 3.x's proxy name to optimize proxy judge.
laywin Dec 3, 2023
53f3070
Merge branch '2.x' of github.com:seata/seata into 2.x
laywin Dec 3, 2023
2a01c04
add change registry info
laywin Dec 3, 2023
6513a35
add try other app logic in TCC mode when TC send order of two phase
laywin Dec 3, 2023
184e05a
fix unit test
laywin Dec 3, 2023
27f1db4
rollback tryotherapp param
laywin Dec 4, 2023
61df543
rm Unused import
laywin Dec 4, 2023
5efb325
optimize tcc judge
laywin Dec 6, 2023
988bb7a
1. rm try other app when send tc's order
laywin Dec 7, 2023
056c3f0
Merge branch '2.x' into 2.x
funky-eyes Dec 16, 2023
60b4adf
add the try other app back && allow at mode to enable
laywin Dec 17, 2023
a6af930
add try other app back
laywin Dec 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6075](https://github.com/seata/seata/pull/6075)] fix missing table alias for on update column of image SQL
- [[#6086](https://github.com/seata/seata/pull/6086)] fix oracle column alias cannot find
- [[#6085](https://github.com/seata/seata/pull/6085)] fix jdk9+ compile error
- [[#6101](https://github.com/seata/seata/pull/6101)] fix the consumer can't generate tcc proxy in dubbo 3.x version
- [[#6077](https://github.com/seata/seata/pull/6077)] fix could not rollback when table with multiple primary
- [[#6121](https://github.com/seata/seata/pull/6121)] fix the branch transaction order error when rolling back

Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [[#6075](https://github.com/seata/seata/pull/6075)] 修复镜像SQL对于on update列没有添加表别名的问题
- [[#6086](https://github.com/seata/seata/pull/6086)] 修复oracle alias 解析异常
- [[#6085](https://github.com/seata/seata/pull/6085)] 修复jdk9+版本编译后,引入后ByteBuffer#flip NoSuchMethodError的问题
- [[#6101](https://github.com/seata/seata/pull/6101)] 修复在dubbo 3.x的版本中, 消费者端不能生成tcc代理的问题
- [[#6077](https://github.com/seata/seata/pull/6077)] 修复表存在复合主键索引导致无法回滚问题
- [[#6121](https://github.com/seata/seata/pull/6121)] 修复回滚分支事务时没有按照时间排序的问题

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/seata/core/rpc/RemotingServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public interface RemotingServer {
* @param resourceId rm client resourceId
* @param clientId rm client id
* @param msg transaction message {@code io.seata.core.protocol}
* @param tryOtherApp try other app
* @param tryOtherApp try other app
* @return client result message
* @throws TimeoutException TimeoutException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ private static Channel getChannelFromSameClientMap(Map<Integer, RpcContext> clie
*
* @param resourceId Resource ID
* @param clientId Client ID - ApplicationId:IP:Port
* @param tryOtherApp try other app
* @return Corresponding channel, NULL if not found.
*/
public static Channel getChannel(String resourceId, String clientId, boolean tryOtherApp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ private DubboUtil() {
private static final String ALIBABA_DUBBO_PROXY_NAME_PREFIX = "com.alibaba.dubbo.common.bytecode.proxy";
private static final String APACHE_DUBBO_PROXY_NAME_PREFIX = "org.apache.dubbo.common.bytecode.proxy";

private static final String DUBBO_3_X_PARTIAL_PROXY_NAME = "DubboProxy";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you only use contains? and not startsWith or endsWith?
只能使用contains?而不是startsWith或者endsWith吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

there is no fixed prefix or suffix in generated proxy name, i will try later to concat a prefix to judge.
生成代理名字的时候没有固定的前缀和后缀,我看能不能凭借一个前缀来判断.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deeply analyzing the source code is really excellent.


/**
* get the interface class of the dubbo proxy which be generated by javaassist
*
Expand Down Expand Up @@ -69,6 +71,6 @@ public static Class<?> getAssistInterface(Object proxyBean)
}

public static boolean isDubboProxyName(String name) {
return name.startsWith(ALIBABA_DUBBO_PROXY_NAME_PREFIX) || name.startsWith(APACHE_DUBBO_PROXY_NAME_PREFIX);
return name.startsWith(ALIBABA_DUBBO_PROXY_NAME_PREFIX) || name.startsWith(APACHE_DUBBO_PROXY_NAME_PREFIX) || name.contains(DUBBO_3_X_PARTIAL_PROXY_NAME);
}
}
Loading