sermant-io / Sermant

A Cloud-Native Proxyless Service Mesh based on Java Bytecode Enhancement Technology
https://sermant.io/
Apache License 2.0
1.26k stars 170 forks source link

ServiceInstanceListSupplier enhancement failure in Spring Cloud #1454

Closed chenzhiguo closed 6 months ago

chenzhiguo commented 9 months ago

What happened?

"org.springframework.cloud.loadbalancer.core.CachingServiceInstanceListSupplier", "org.springframework.cloud.loadbalancer.core.DiscoveryClientServiceInstanceListSupplier" and "get" method words enhanced by plugin com.huaweicloud.sermant.router.spring.declarer.ServiceInstanceListSupplierDeclarer The section code has not been changed.

How can we reproduce it (as minimally and precisely as possible)?

Turn on agent.config.isOutputEnhancedClasses=true Start the project and observe the enhanced class list in the output path.

Anything else we need to know?

No response

Sermant version

The develop branch should correspond to 1.3.x

OS version

macOS 14.3.1 M1 Pro
hanbingleixue commented 8 months ago

Only when the thread pool asynchronous routing is not enabled, it needs to be enhanced through ServiceInstanceListSupplierDeclarer. ServiceInstanceListSupplierDeclarer is not enhanced by default. If you need ServiceInstanceListSupplierDeclarer to enhance the get methods of org.springframework.cloud.loadbalancer.core.CachingServiceInstanceListSupplier, org.springframework.cloud.loadbalancer.core.DiscoveryClientServiceInstanceListSupplier, please change enabled-thread-pool in the routing configuration to false.

github-actions[bot] commented 7 months ago

This issue seems to be Stale. We will close it in a few days.

hanbingleixue commented 6 months ago

A solution has been provided. No other problems will occur in the future. Therefore, this issue is closed.