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

cse这种cse://appId:serviceName/path调用方式,会在URI内部抛出一个URISyntaxException异常 #4514

Open
yanghao605 opened this issue Sep 12, 2024 · 3 comments

Comments

@yanghao605
Copy link
Contributor

大致原因是在CseUriTemplateHandler中的createUri方法会调用new URI方法创建一个url对象,而cse的url中appId:ServiceName会被解析为port,导致URI内部抛出URISyntaxException异常,进入异常捕获的逻辑

在高并发场景下,这里成为了性能瓶颈,是否可以考虑新增一种appId.ServiceName的形式呢?

@liubao68
Copy link
Contributor

你描述的问题和并发有关系吗?能够提供一下重现方法?

@liubao68
Copy link
Contributor

可以看下https://github.com/apache/servicecomb-java-chassis/pull/4438, 是不是这个修复已经同时解决了你的问题?

@yanghao605
Copy link
Contributor Author

可以看下https://github.com/apache/servicecomb-java-chassis/pull/4438, 是不是这个修复已经同时解决了你的问题?

链接丢失,这个场景是使用spring的RestTemplate必走的逻辑,创建对应的URI时,会走到URISyntaxException处理逻辑,实际不影响功能,只是在一些高性能要求下,可能会耗时比较多

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants