Closed frostyplanet closed 3 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 85.10%. Comparing base (
d6465c9
) to head (bb150cd
). Report is 11 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
CI is fixed, could you rebase?
@qinxuye all ci passed
Fix route problem when both service listening 0.0.0.0:port calling each other
Two service listen on 0.0.0.0:1234, on different hosts:
xoscar.actor_ref(111.111.111.111:1234) will return unexpected LocalActorRef.
log print in context.actor_ref(111.111.111.111:1234)
using the returned LocalActorRef, method call intend for remote service actually sent to local service.
The solution is simple, during pool initialization, do not register_local_pool if address is all zero (because it's a widcast)
基于此前的改动 https://github.com/xorbitsai/xoscar/pull/92 发现了一个场景中的问题:
场景是两个服务,都 listen 0.0.0.0 但是在不同主机上同一个端口, 当写一个函数从 hostA.method 中去调用 hostB.method, 发现实际行为是 hostA.method 调用了 hostA.method,出现死循环。是由于从 hostA 去构建 actor_ref(hostB) 的时候返回了LocalActorRef。调查发现和 pool 初始化的行为有关。 解决办法是: 通配地址 0.0.0.0 不应该认为是本地地址,正常走 socket 通信就可以了.