mrhbj opened a new issue #9270:
URL: https://github.com/apache/dubbo/issues/9270
MigrationInvoker promotion is default 100, so this judge has
problem,because it is inefficient, it doesn't need to use
ThreadLocalRandom.current().nextDouble(100) where promotion is default 100.
@Override
public Result invoke(Invocation invocation) throws RpcException {
if (currentAvailableInvoker != null) {
if (step == APPLICATION_FIRST) {
// call ratio calculation based on random value
if (ThreadLocalRandom.current().nextDouble(100) > promotion)
{
return invoker.invoke(invocation);
}
}
return currentAvailableInvoker.invoke(invocation);
}
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]