Skip to content

Commit

Permalink
bugfix: when pgsql multi schema then channel not found (apache#3879)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbxyyx authored Jul 23, 2021
1 parent 5276c98 commit 3a9f9d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#3828](https://github.com/seata/seata/pull/3828)] 修复StringUtils抛出StackOverflowError的问题
- [[#3817](https://github.com/seata/seata/pull/3817)] 修复TC在SkyWalking拓扑图节点不汇聚的问题
- [[#3803](https://github.com/seata/seata/pull/3803)] 修复 ReflectionUtil 抛出不预期异常问题
- [[#3879](https://github.com/seata/seata/pull/3803)] 修复 posrgresql多schema无法找到channel问题
- [[#3881](https://github.com/seata/seata/pull/3881)] 修复不存在的相同 DataId 不同默认值返回相同值的问题


Expand Down
1 change: 1 addition & 0 deletions changes/en-us/1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
- [[#3828](https://github.com/seata/seata/pull/3828)] fix StringUtils StackOverflowError
- [[#3817](https://github.com/seata/seata/pull/3817)] fix TC SkyWalking topo calling node not gather
- [[#3803](https://github.com/seata/seata/pull/3803)] fix ReflectionUtil throw unexpected exception
- [[#3879](https://github.com/seata/seata/pull/3803)] fix postgresql multi schema throw not found channel exception
- [[#3881](https://github.com/seata/seata/pull/3881)] fix getConfig with different default value return the first


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.concurrent.TimeUnit;
import javax.sql.DataSource;

import io.seata.common.Constants;
import io.seata.common.thread.NamedThreadFactory;
import io.seata.config.ConfigurationFactory;
import io.seata.core.constants.ConfigurationKeys;
Expand Down Expand Up @@ -200,6 +201,9 @@ private String getPGResourceId() {
String[] urlParams = paramUrl.split("&");
for (String urlParam : urlParams) {
if (urlParam.contains("currentSchema")) {
if (urlParam.contains(Constants.DBKEYS_SPLIT_CHAR)) {
urlParam = urlParam.replace(Constants.DBKEYS_SPLIT_CHAR, "!");
}
paramsBuilder.append(urlParam);
break;
}
Expand Down

0 comments on commit 3a9f9d0

Please sign in to comment.