Jafeyyu commented on issue #2546:
URL: https://github.com/apache/dubbo-go/issues/2546#issuecomment-1874806859

   > > 
最终导致timeout被缩小了1000000倍,变成了0,将上述方法中的两处Milliseconds()更改成Nanoseconds(),测试timeout获取正常
   > 
   > hessian最开始的实现中为什么要做 `service.Timeout / time.Millisecond` 那?是有什么特殊原因吗
   
   
我看了一下提交记录,dubbo_invoker.go从四年前添加getTimeout方法时就做了转换成millisecond的处理,而hession从3年前创建的时候就做了
 `service.Timeout / time.Millisecond` 
的处理,我个人感觉这个处理没有什么特殊原因,而是这两个地方没有协调好造成的。我当初选择更改dubbo_invoker.go中的getTimout处,是考虑在此处使用最基础的单位,然后其他地方可以按照各自的需求处理成想要的时间单位。但是如果决定要统一所有地方的时间单位,后续可以在dubbo_invoker的getTimeout方法中统一进行时间格式化,然后对hession进行变更,改为直接使用


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to