You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/10 09:30:41 UTC

[GitHub] [dubbo] zrlw opened a new issue #8765: RegistryProtocol的doOverrideIfNecessary方法里exporter.getInvoker()在实际应用场景下会不会是null

zrlw opened a new issue #8765:
URL: https://github.com/apache/dubbo/issues/8765


   ### Environment
   master分支github构建日志显示ReferenceConfigTest测试方法testReferenceRetry() line 118出现NPE,
   ```
           try {
               System.setProperty("java.net.preferIPv4Stack", "true");
               sc.export();  // line 135:  NPE occurred here !!!
               demoService = rc.get();
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           } finally {
   ```
   在RegistryProtocol.doOverrideIfNecessary() 691行设置断点:
   ```
   URL currentUrl = exporter.getInvoker().getUrl();
   ```
   跟踪testReferenceRetry测试方法发现exporter.getInvoker()返回为null,提交了一个修复PR #8683
   但是这个异常被不会影响测试流程,因为异常被调用方法FailbackRegistry.notify()捕获了,只是输出一个error日志。
   
   当前3.0分支ReferenceConfigTest测试方法testReferenceRetry() 改用InjvmProtocol.getInjvmProtocol().export(...),不会再调用RegistryProtocol了,所以3.0的RegistryProtocol和master取currentUrl是同样的代码,但构建日志不会出现这个NPE。
   
   不清楚实际应用场景下是否有master分支的这个测试场景, 这个问题有必要做修复么?


-- 
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-unsubscribe@dubbo.apache.org

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



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


[GitHub] [dubbo] zrlw commented on issue #8765: RegistryProtocol的doOverrideIfNecessary方法里exporter.getInvoker()在实际应用场景下会不会是null

Posted by GitBox <gi...@apache.org>.
zrlw commented on issue #8765:
URL: https://github.com/apache/dubbo/issues/8765#issuecomment-921691933


   > You can write a test for this scenario to verify whether there is a problem with the 3.0 branch.
   
   yes, i add test2ReferenceRetry() in #8768 and NPE will be thrown with 3.0.   


-- 
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-unsubscribe@dubbo.apache.org

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



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


[GitHub] [dubbo] CrazyHZM closed issue #8765: RegistryProtocol的doOverrideIfNecessary方法里exporter.getInvoker()在实际应用场景下会不会是null

Posted by GitBox <gi...@apache.org>.
CrazyHZM closed issue #8765:
URL: https://github.com/apache/dubbo/issues/8765


   


-- 
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-unsubscribe@dubbo.apache.org

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



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


[GitHub] [dubbo] CrazyHZM commented on issue #8765: RegistryProtocol的doOverrideIfNecessary方法里exporter.getInvoker()在实际应用场景下会不会是null

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on issue #8765:
URL: https://github.com/apache/dubbo/issues/8765#issuecomment-921645935


   You can write a  test for this scenario to verify whether there is a problem with the 3.0 branch.


-- 
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-unsubscribe@dubbo.apache.org

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



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