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/05 06:31:33 UTC

[GitHub] [dubbo] zrlw opened a new pull request #8683: fix destroy NullPointerException and doOverrideIfNecessary

zrlw opened a new pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683


   ## What is the purpose of the change
   fix #8681 on 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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704070879



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       one report of github say NPE occurred at here:
   ```
   2021-09-04T18:15:20.5853500Z java.lang.NullPointerException
   2021-09-04T18:15:20.5855218Z at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:691)
   2021-09-04T18:15:20.5857572Z at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.notify(RegistryProtocol.java:672)
   2021-09-04T18:15:20.5859640Z at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:429)
   2021-09-04T18:15:20.5861641Z at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:372)
   2021-09-04T18:15:20.5863623Z at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
   2021-09-04T18:15:20.5865836Z at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:181)
   2021-09-04T18:15:20.5868092Z at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
   2021-09-04T18:15:20.5870274Z at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
   2021-09-04T18:15:20.5872504Z at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:232)
   2021-09-04T18:15:20.5874770Z at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
   2021-09-04T18:15:20.5877025Z at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:73)
   2021-09-04T18:15:20.5878629Z at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
   2021-09-04T18:15:20.5880268Z at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:518)
   2021-09-04T18:15:20.5882154Z at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:339)
   2021-09-04T18:15:20.5883655Z at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:314)
   2021-09-04T18:15:20.5885108Z at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:238)
   2021-09-04T18:15:20.5886991Z at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:135)
   ```
   at org.apache.dubbo.config.ReferenceConfigTest testReferenceRetry():
   ```
           try {
               System.setProperty("java.net.preferIPv4Stack", "true");
               sc.export();  <=== throw NPE here
               demoService = rc.get();
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           } 
   ```
   ReferenceConfigTest.java version: https://github.com/zrlw/dubbo/commit/dee73739695b0882b099ad0d6c595a4f867933ba#diff-a3037d1b17666ec81a82a602dbae49a1c56c744fd1e88f07f7106f91a6b00988




-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704070879



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       this NPE  don't make the test failure because the exception was catched by FailbackRegistry.notify() line 367:
   ```
           try {
               doNotify(url, listener, urls);
           } catch (Exception t) {
               // Record a failed registration request to a failed list
               logger.error("Failed to notify addresses for subscribe " + url + ", cause: " + t.getMessage(), t); // line 367
           }
   ```
   so we can't find the issue only by the test result !!!
   
   one report of github say NPE occurred at here:
   ```
   2021-09-04T15:32:54.6371279Z [04/09/21 15:32:54:558 UTC] main ERROR zookeeper.ZookeeperRegistry:  [DUBBO] Failed to notify addresses for subscribe provider://172.18.64.1:2/org.apache.dubbo.config.api.DemoService?anyhost=true&application=test-reference-retry&bind.ip=172.18.64.1&bind.port=2&category=configurators&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=org.apache.dubbo.config.api.DemoService&metadata-type=remote&methods=getUsers,sayName,echo,throwDemoException,getBox&monitor=dubbo%3A%2F%2Fmonitor-addr%3A12080%3Fapplication%3Dtest-reference-retry%26dubbo%3D2.0.2%26interface%3Dorg.apache.dubbo.monitor.MonitorService%26pid%3D9096%26register.ip%3D172.18.64.1%26release%3D2.7.14-SNAPSHOT%26tag1%3Dvalue1%26tag2%3Dvalue2%26tag3%3Dvalue3%26timestamp%3D1630769574453&pid=9096&release=2.7.14-SNAPSHOT&service.name=ServiceBean:/org.apache.dubbo.config.api.DemoService&side=provider&tag1=value1&tag2=value2&tag3=value3&timestamp=1630769574426, cause: null, dubbo
  version: 2.7.14-SNAPSHOT, current host: 172.18.64.1
   2021-09-04T15:32:54.6376874Z java.lang.NullPointerException
   2021-09-04T15:32:54.6378945Z 	at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:691)  <=== throw NPE here
   2021-09-04T15:32:54.6381863Z 	at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.notify(RegistryProtocol.java:672)
   2021-09-04T15:32:54.6384112Z 	at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:429)
   2021-09-04T15:32:54.6386310Z 	at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:372)
   2021-09-04T15:32:54.6388607Z 	at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
   2021-09-04T15:32:54.6390958Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:181)
   2021-09-04T15:32:54.6393129Z 	at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
   2021-09-04T15:32:54.6395216Z 	at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
   2021-09-04T15:32:54.6397337Z 	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:232)
   2021-09-04T15:32:54.6399486Z 	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
   2021-09-04T15:32:54.6401638Z 	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:73)
   2021-09-04T15:32:54.6403164Z 	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
   2021-09-04T15:32:54.6404748Z 	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:518)
   2021-09-04T15:32:54.6406534Z 	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:339)
   2021-09-04T15:32:54.6408001Z 	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:314)
   2021-09-04T15:32:54.6409401Z 	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:238)
   2021-09-04T15:32:54.6411194Z 	at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:135)
   ```
   org.apache.dubbo.config.ReferenceConfigTest testReferenceRetry() code snippet:
   ( version: https://github.com/apache/dubbo/pull/7754 )
   ```
       try {
               demoService = rc.get();  // line 118: RuntimeException occurred here !!!
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           }
           Assertions.assertFalse(success);
           Assertions.assertNull(demoService);
   
           ServiceConfig<DemoService> sc = new ServiceConfig<DemoService>();
           sc.setInterface(DemoService.class);
           sc.setRef(new DemoServiceImpl());
           sc.setApplication(application);
           sc.setRegistry(registry);
           sc.setProtocol(protocol);
   
           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 {
   ```
   PS:
   a RuntimeException thrown out of ReferenceConfigTest  line 118, it was trigged by calling invoker.destroy() at ReferenceConfig.checkInvokerAvailable line 421:
   ```
   2021-09-04T15:32:54.4747828Z [04/09/21 15:32:54:400 UTC] main  WARN integration.DynamicDirectory:  [DUBBO] unexpected error when unregister service org.apache.dubbo.config.api.DemoServicefrom registryzookeeper://localhost:36237/org.apache.dubbo.registry.RegistryService?application=test-reference-retry&dubbo=2.0.2&interface=org.apache.dubbo.registry.RegistryService&pid=9096&release=2.7.14-SNAPSHOT&tag1=value1&tag2=value2&tag3=value3&timestamp=1630769573778, dubbo version: 2.7.14-SNAPSHOT, current host: 172.18.64.1
   2021-09-04T15:32:54.4753549Z java.lang.RuntimeException
   2021-09-04T15:32:54.4755171Z 	at org.apache.dubbo.common.function.ThrowableFunction.execute(ThrowableFunction.java:54)
   2021-09-04T15:32:54.4760684Z 	at org.apache.dubbo.common.function.ThrowableFunction.execute(ThrowableFunction.java:69)
   2021-09-04T15:32:54.4764242Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.doInServiceDiscovery(ZookeeperServiceDiscovery.java:190)
   2021-09-04T15:32:54.4769705Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.getServices(ZookeeperServiceDiscovery.java:113)
   2021-09-04T15:32:54.4773249Z 	at org.apache.dubbo.registry.client.EventPublishingServiceDiscovery.getServices(EventPublishingServiceDiscovery.java:192)
   2021-09-04T15:32:54.4776688Z 	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.isAvailable(ServiceDiscoveryRegistry.java:307)
   2021-09-04T15:32:54.4780044Z 	at org.apache.dubbo.registry.ListenerRegistryWrapper.isAvailable(ListenerRegistryWrapper.java:46)
   2021-09-04T15:32:54.4782684Z 	at org.apache.dubbo.registry.integration.DynamicDirectory.destroy(DynamicDirectory.java:232)
   2021-09-04T15:32:54.4785253Z 	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.destroy(AbstractClusterInvoker.java:112)
   2021-09-04T15:32:54.4787941Z 	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.destroy(AbstractCluster.java:118)
   2021-09-04T15:32:54.4790714Z 	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.destroy(MockClusterInvoker.java:78)
   2021-09-04T15:32:54.4793452Z 	at org.apache.dubbo.registry.client.migration.MigrationInvoker.destroy(MigrationInvoker.java:195)
   2021-09-04T15:32:54.4796742Z 	at org.apache.dubbo.config.ReferenceConfig.checkInvokerAvailable(ReferenceConfig.java:421)
   2021-09-04T15:32:54.4799064Z 	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:323)
   2021-09-04T15:32:54.4800871Z 	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:206)
   2021-09-04T15:32:54.4803180Z 	at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:118)
   ....
   2021-09-04T15:32:54.5500454Z java.lang.IllegalStateException: Failed to check the status of the service org.apache.dubbo.config.api.DemoService. No provider available for the service org.apache.dubbo.config.api.DemoService from the url dubbo://172.18.64.1/org.apache.dubbo.config.api.DemoService?application=test-reference-retry&dubbo=2.0.2&interface=org.apache.dubbo.config.api.DemoService&metadata-type=remote&methods=getUsers,sayName,echo,throwDemoException,getBox&pid=9096&register.ip=172.18.64.1&release=2.7.14-SNAPSHOT&side=consumer&sticky=false&tag1=value1&tag2=value2&tag3=value3&timestamp=1630769573763 to the consumer 172.18.64.1 use dubbo version 2.7.14-SNAPSHOT
   2021-09-04T15:32:54.5506360Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
   2021-09-04T15:32:54.5509785Z 	at org.apache.dubbo.config.ReferenceConfig.checkInvokerAvailable(ReferenceConfig.java:431)
   2021-09-04T15:32:54.5582162Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
   2021-09-04T15:32:54.5588528Z 	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:323)
   2021-09-04T15:32:54.5595907Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
   2021-09-04T15:32:54.5598562Z 	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:206)
   2021-09-04T15:32:54.5600730Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
   2021-09-04T15:32:54.5858986Z 	at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:118)
   ```
   the whole  job logs:  https://github.com/apache/dubbo/runs/3513846068?check_suite_focus=true
   Unit Test On windows-2019 (JDK: 8)
   
   if you set breakpoint at RegistryProtocol.doOverrideIfNecessary()  line 691:
   ```URL currentUrl = exporter.getInvoker().getUrl();```
   you will find exporter.getInvoker() is null
   




-- 
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] codecov-commenter edited a comment on pull request #8683: [master] fix destroy NullPointerException and doOverrideIfNecessary

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#issuecomment-913098208


   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#8683](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e09ea60) into [master](https://codecov.io/gh/apache/dubbo/commit/7d95364a4d605cf21d077882724340b749b4e63b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7d95364) will **increase** coverage by `0.01%`.
   > The diff coverage is `80.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8683/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8683      +/-   ##
   ============================================
   + Coverage     61.03%   61.05%   +0.01%     
   + Complexity      448      447       -1     
   ============================================
     Files          1097     1097              
     Lines         44398    44406       +8     
     Branches       6466     6469       +3     
   ============================================
   + Hits          27098    27110      +12     
   + Misses        14317    14305      -12     
   - Partials       2983     2991       +8     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...a/org/apache/dubbo/rpc/model/ApplicationModel.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvQXBwbGljYXRpb25Nb2RlbC5qYXZh) | `75.00% <75.00%> (ø)` | |
   | [...e/dubbo/registry/integration/RegistryProtocol.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9SZWdpc3RyeVByb3RvY29sLmphdmE=) | `62.31% <83.33%> (+2.00%)` | :arrow_up: |
   | [...port/identifier/BaseServiceMetadataIdentifier.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvaWRlbnRpZmllci9CYXNlU2VydmljZU1ldGFkYXRhSWRlbnRpZmllci5qYXZh) | `53.57% <0.00%> (-7.15%)` | :arrow_down: |
   | [...ava/org/apache/dubbo/config/DubboShutdownHook.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9EdWJib1NodXRkb3duSG9vay5qYXZh) | `84.61% <0.00%> (-3.85%)` | :arrow_down: |
   | [...he/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eVNlcnZlci5qYXZh) | `70.17% <0.00%> (-3.51%)` | :arrow_down: |
   | [.../dubbo/remoting/transport/netty4/NettyChannel.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2hhbm5lbC5qYXZh) | `61.38% <0.00%> (-2.98%)` | :arrow_down: |
   | [...g/apache/dubbo/registry/consul/ConsulRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktY29uc3VsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jb25zdWwvQ29uc3VsUmVnaXN0cnkuamF2YQ==) | `60.00% <0.00%> (-0.59%)` | :arrow_down: |
   | [...apache/dubbo/common/extension/ExtensionLoader.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vZXh0ZW5zaW9uL0V4dGVuc2lvbkxvYWRlci5qYXZh) | `80.89% <0.00%> (-0.43%)` | :arrow_down: |
   | [.../apache/dubbo/config/bootstrap/DubboBootstrap.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9ib290c3RyYXAvRHViYm9Cb290c3RyYXAuamF2YQ==) | `54.58% <0.00%> (-0.16%)` | :arrow_down: |
   | ... and [2 more](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7d95364...e09ea60](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704070879



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       this NPE  don't make the test failure because the exception was catched by FailbackRegistry.notify() line 367:
   ```
           try {
               doNotify(url, listener, urls);
           } catch (Exception t) {
               // Record a failed registration request to a failed list
               logger.error("Failed to notify addresses for subscribe " + url + ", cause: " + t.getMessage(), t); // line 367
           }
   ```
   so we can't find the issue only by the test result, if you set breakpoint at RegistryProtocol.doOverrideIfNecessary()  line 691 and debug the test method testReferenceRetry():
   ```URL currentUrl = exporter.getInvoker().getUrl();```
   you will find the value of exporter.getInvoker() is null.
   
   one report snippet of github Unit Test On windows-2019 (JDK: 8) CI:
   (the whole  job logs:  https://github.com/apache/dubbo/runs/3513846068?check_suite_focus=true)
   ```
   2021-09-04T15:32:54.6371279Z [04/09/21 15:32:54:558 UTC] main ERROR zookeeper.ZookeeperRegistry:  [DUBBO] Failed to notify addresses for subscribe provider://172.18.64.1:2/org.apache.dubbo.config.api.DemoService?anyhost=true&application=test-reference-retry&bind.ip=172.18.64.1&bind.port=2&category=configurators&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=org.apache.dubbo.config.api.DemoService&metadata-type=remote&methods=getUsers,sayName,echo,throwDemoException,getBox&monitor=dubbo%3A%2F%2Fmonitor-addr%3A12080%3Fapplication%3Dtest-reference-retry%26dubbo%3D2.0.2%26interface%3Dorg.apache.dubbo.monitor.MonitorService%26pid%3D9096%26register.ip%3D172.18.64.1%26release%3D2.7.14-SNAPSHOT%26tag1%3Dvalue1%26tag2%3Dvalue2%26tag3%3Dvalue3%26timestamp%3D1630769574453&pid=9096&release=2.7.14-SNAPSHOT&service.name=ServiceBean:/org.apache.dubbo.config.api.DemoService&side=provider&tag1=value1&tag2=value2&tag3=value3&timestamp=1630769574426, cause: null, dubbo
  version: 2.7.14-SNAPSHOT, current host: 172.18.64.1
   2021-09-04T15:32:54.6376874Z java.lang.NullPointerException
   2021-09-04T15:32:54.6378945Z 	at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:691)  <=== throw NPE here
   2021-09-04T15:32:54.6381863Z 	at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.notify(RegistryProtocol.java:672)
   2021-09-04T15:32:54.6384112Z 	at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:429)
   2021-09-04T15:32:54.6386310Z 	at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:372)
   2021-09-04T15:32:54.6388607Z 	at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
   2021-09-04T15:32:54.6390958Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:181)
   2021-09-04T15:32:54.6393129Z 	at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
   2021-09-04T15:32:54.6395216Z 	at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
   2021-09-04T15:32:54.6397337Z 	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:232)
   2021-09-04T15:32:54.6399486Z 	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
   2021-09-04T15:32:54.6401638Z 	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:73)
   2021-09-04T15:32:54.6403164Z 	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
   2021-09-04T15:32:54.6404748Z 	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:518)
   2021-09-04T15:32:54.6406534Z 	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:339)
   2021-09-04T15:32:54.6408001Z 	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:314)
   2021-09-04T15:32:54.6409401Z 	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:238)
   2021-09-04T15:32:54.6411194Z 	at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:135)
   ```
   org.apache.dubbo.config.ReferenceConfigTest testReferenceRetry() code snippet:
   ( version: https://github.com/apache/dubbo/pull/7754 )
   ```
       try {
               demoService = rc.get();  // line 118: RuntimeException occurred here !!!
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           }
           Assertions.assertFalse(success);
           Assertions.assertNull(demoService);
   
           ServiceConfig<DemoService> sc = new ServiceConfig<DemoService>();
           sc.setInterface(DemoService.class);
           sc.setRef(new DemoServiceImpl());
           sc.setApplication(application);
           sc.setRegistry(registry);
           sc.setProtocol(protocol);
   
           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 {
   ```
   PS:
   a RuntimeException thrown out of ReferenceConfigTest  line 118, it was trigged by calling invoker.destroy() at ReferenceConfig.checkInvokerAvailable line 421:
   ```
   2021-09-04T15:32:54.4747828Z [04/09/21 15:32:54:400 UTC] main  WARN integration.DynamicDirectory:  [DUBBO] unexpected error when unregister service org.apache.dubbo.config.api.DemoServicefrom registryzookeeper://localhost:36237/org.apache.dubbo.registry.RegistryService?application=test-reference-retry&dubbo=2.0.2&interface=org.apache.dubbo.registry.RegistryService&pid=9096&release=2.7.14-SNAPSHOT&tag1=value1&tag2=value2&tag3=value3&timestamp=1630769573778, dubbo version: 2.7.14-SNAPSHOT, current host: 172.18.64.1
   2021-09-04T15:32:54.4753549Z java.lang.RuntimeException
   2021-09-04T15:32:54.4755171Z 	at org.apache.dubbo.common.function.ThrowableFunction.execute(ThrowableFunction.java:54)
   2021-09-04T15:32:54.4760684Z 	at org.apache.dubbo.common.function.ThrowableFunction.execute(ThrowableFunction.java:69)
   2021-09-04T15:32:54.4764242Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.doInServiceDiscovery(ZookeeperServiceDiscovery.java:190)
   2021-09-04T15:32:54.4769705Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.getServices(ZookeeperServiceDiscovery.java:113)
   2021-09-04T15:32:54.4773249Z 	at org.apache.dubbo.registry.client.EventPublishingServiceDiscovery.getServices(EventPublishingServiceDiscovery.java:192)
   2021-09-04T15:32:54.4776688Z 	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.isAvailable(ServiceDiscoveryRegistry.java:307)
   2021-09-04T15:32:54.4780044Z 	at org.apache.dubbo.registry.ListenerRegistryWrapper.isAvailable(ListenerRegistryWrapper.java:46)
   2021-09-04T15:32:54.4782684Z 	at org.apache.dubbo.registry.integration.DynamicDirectory.destroy(DynamicDirectory.java:232)
   2021-09-04T15:32:54.4785253Z 	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.destroy(AbstractClusterInvoker.java:112)
   2021-09-04T15:32:54.4787941Z 	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.destroy(AbstractCluster.java:118)
   2021-09-04T15:32:54.4790714Z 	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.destroy(MockClusterInvoker.java:78)
   2021-09-04T15:32:54.4793452Z 	at org.apache.dubbo.registry.client.migration.MigrationInvoker.destroy(MigrationInvoker.java:195)
   2021-09-04T15:32:54.4796742Z 	at org.apache.dubbo.config.ReferenceConfig.checkInvokerAvailable(ReferenceConfig.java:421)
   2021-09-04T15:32:54.4799064Z 	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:323)
   2021-09-04T15:32:54.4800871Z 	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:206)
   2021-09-04T15:32:54.4803180Z 	at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:118)
   ....
   2021-09-04T15:32:54.5500454Z java.lang.IllegalStateException: Failed to check the status of the service org.apache.dubbo.config.api.DemoService. No provider available for the service org.apache.dubbo.config.api.DemoService from the url dubbo://172.18.64.1/org.apache.dubbo.config.api.DemoService?application=test-reference-retry&dubbo=2.0.2&interface=org.apache.dubbo.config.api.DemoService&metadata-type=remote&methods=getUsers,sayName,echo,throwDemoException,getBox&pid=9096&register.ip=172.18.64.1&release=2.7.14-SNAPSHOT&side=consumer&sticky=false&tag1=value1&tag2=value2&tag3=value3&timestamp=1630769573763 to the consumer 172.18.64.1 use dubbo version 2.7.14-SNAPSHOT
   2021-09-04T15:32:54.5506360Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
   2021-09-04T15:32:54.5509785Z 	at org.apache.dubbo.config.ReferenceConfig.checkInvokerAvailable(ReferenceConfig.java:431)
   2021-09-04T15:32:54.5582162Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
   2021-09-04T15:32:54.5588528Z 	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:323)
   2021-09-04T15:32:54.5595907Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
   2021-09-04T15:32:54.5598562Z 	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:206)
   2021-09-04T15:32:54.5600730Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
   2021-09-04T15:32:54.5858986Z 	at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:118)
   ```




-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r705854330



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       属于偶发异常,可能和 #8725 是同样的问题,AfterEach的释放全局资源操作干扰了正在运行的dubbo后台线程,导致后续的测试方法出现异常。




-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r705854330



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       属于偶发异常,可能和 #8725 是同样的问题,AfterEach的释放全局资源操作干扰了正在运行的dubbo后台线程,导致后续的测试方法出现异常。




-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704070879



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       one report of github say NPE here:
   ```
   2021-09-04T18:15:20.5853500Z java.lang.NullPointerException
   2021-09-04T18:15:20.5855218Z at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:691)
   2021-09-04T18:15:20.5857572Z at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.notify(RegistryProtocol.java:672)
   2021-09-04T18:15:20.5859640Z at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:429)
   2021-09-04T18:15:20.5861641Z at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:372)
   2021-09-04T18:15:20.5863623Z at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
   2021-09-04T18:15:20.5865836Z at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:181)
   2021-09-04T18:15:20.5868092Z at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
   2021-09-04T18:15:20.5870274Z at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
   2021-09-04T18:15:20.5872504Z at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:232)
   2021-09-04T18:15:20.5874770Z at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
   2021-09-04T18:15:20.5877025Z at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:73)
   2021-09-04T18:15:20.5878629Z at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
   2021-09-04T18:15:20.5880268Z at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:518)
   2021-09-04T18:15:20.5882154Z at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:339)
   2021-09-04T18:15:20.5883655Z at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:314)
   2021-09-04T18:15:20.5885108Z at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:238)
   2021-09-04T18:15:20.5886991Z at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:135)
   ```




-- 
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] codecov-commenter commented on pull request #8683: [master] fix destroy NullPointerException and doOverrideIfNecessary

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#issuecomment-913098208


   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#8683](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e09ea60) into [master](https://codecov.io/gh/apache/dubbo/commit/7d95364a4d605cf21d077882724340b749b4e63b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7d95364) will **decrease** coverage by `0.73%`.
   > The diff coverage is `80.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8683/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8683      +/-   ##
   ============================================
   - Coverage     61.03%   60.29%   -0.74%     
   + Complexity      448      446       -2     
   ============================================
     Files          1097     1097              
     Lines         44398    44359      -39     
     Branches       6466     6437      -29     
   ============================================
   - Hits          27098    26747     -351     
   - Misses        14317    14631     +314     
   + Partials       2983     2981       -2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...a/org/apache/dubbo/rpc/model/ApplicationModel.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvQXBwbGljYXRpb25Nb2RlbC5qYXZh) | `75.00% <75.00%> (ø)` | |
   | [...e/dubbo/registry/integration/RegistryProtocol.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9SZWdpc3RyeVByb3RvY29sLmphdmE=) | `62.31% <83.33%> (+2.00%)` | :arrow_up: |
   | [...gcenter/wrapper/CompositeDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci93cmFwcGVyL0NvbXBvc2l0ZUR5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (-73.34%)` | :arrow_down: |
   | [...ookeeper/ZookeeperDynamicConfigurationFactory.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbkZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [...pport/zookeeper/ZookeeperDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `0.00% <0.00%> (-62.86%)` | :arrow_down: |
   | [...fig/configcenter/TreePathDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9UcmVlUGF0aER5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `31.42% <0.00%> (-54.29%)` | :arrow_down: |
   | [.../dubbo/metadata/report/MetadataReportInstance.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvTWV0YWRhdGFSZXBvcnRJbnN0YW5jZS5qYXZh) | `12.50% <0.00%> (-40.63%)` | :arrow_down: |
   | [.../configcenter/support/zookeeper/CacheListener.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9DYWNoZUxpc3RlbmVyLmphdmE=) | `0.00% <0.00%> (-34.29%)` | :arrow_down: |
   | [...gistry/client/migration/MigrationRuleListener.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWlncmF0aW9uL01pZ3JhdGlvblJ1bGVMaXN0ZW5lci5qYXZh) | `55.88% <0.00%> (-23.53%)` | :arrow_down: |
   | [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `62.06% <0.00%> (-20.69%)` | :arrow_down: |
   | ... and [63 more](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7d95364...e09ea60](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704070879



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       one report of github say NPE here




-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704070879



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       one report of github say NPE occurred at here:
   ```
   2021-09-04T15:32:54.6371279Z [04/09/21 15:32:54:558 UTC] main ERROR zookeeper.ZookeeperRegistry:  [DUBBO] Failed to notify addresses for subscribe provider://172.18.64.1:2/org.apache.dubbo.config.api.DemoService?anyhost=true&application=test-reference-retry&bind.ip=172.18.64.1&bind.port=2&category=configurators&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=org.apache.dubbo.config.api.DemoService&metadata-type=remote&methods=getUsers,sayName,echo,throwDemoException,getBox&monitor=dubbo%3A%2F%2Fmonitor-addr%3A12080%3Fapplication%3Dtest-reference-retry%26dubbo%3D2.0.2%26interface%3Dorg.apache.dubbo.monitor.MonitorService%26pid%3D9096%26register.ip%3D172.18.64.1%26release%3D2.7.14-SNAPSHOT%26tag1%3Dvalue1%26tag2%3Dvalue2%26tag3%3Dvalue3%26timestamp%3D1630769574453&pid=9096&release=2.7.14-SNAPSHOT&service.name=ServiceBean:/org.apache.dubbo.config.api.DemoService&side=provider&tag1=value1&tag2=value2&tag3=value3&timestamp=1630769574426, cause: null, dubbo
  version: 2.7.14-SNAPSHOT, current host: 172.18.64.1
   2021-09-04T15:32:54.6376874Z java.lang.NullPointerException
   2021-09-04T15:32:54.6378945Z 	at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:691)  <=== throw NPE here
   2021-09-04T15:32:54.6381863Z 	at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.notify(RegistryProtocol.java:672)
   2021-09-04T15:32:54.6384112Z 	at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:429)
   2021-09-04T15:32:54.6386310Z 	at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:372)
   2021-09-04T15:32:54.6388607Z 	at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
   2021-09-04T15:32:54.6390958Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:181)
   2021-09-04T15:32:54.6393129Z 	at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
   2021-09-04T15:32:54.6395216Z 	at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
   2021-09-04T15:32:54.6397337Z 	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:232)
   2021-09-04T15:32:54.6399486Z 	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
   2021-09-04T15:32:54.6401638Z 	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:73)
   2021-09-04T15:32:54.6403164Z 	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
   2021-09-04T15:32:54.6404748Z 	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:518)
   2021-09-04T15:32:54.6406534Z 	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:339)
   2021-09-04T15:32:54.6408001Z 	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:314)
   2021-09-04T15:32:54.6409401Z 	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:238)
   2021-09-04T15:32:54.6411194Z 	at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:135)
   ```
   org.apache.dubbo.config.ReferenceConfigTest testReferenceRetry() code snippet:
   ( version: https://github.com/apache/dubbo/pull/7754 )
   ```
       try {
               demoService = rc.get();  // line 118: throw RuntimeException here !!!
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           }
           Assertions.assertFalse(success);
           Assertions.assertNull(demoService);
   
           ServiceConfig<DemoService> sc = new ServiceConfig<DemoService>();
           sc.setInterface(DemoService.class);
           sc.setRef(new DemoServiceImpl());
           sc.setApplication(application);
           sc.setRegistry(registry);
           sc.setProtocol(protocol);
   
           try {
               System.setProperty("java.net.preferIPv4Stack", "true");
               sc.export();  // line 135:  throw NPE here !!!
               demoService = rc.get();
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           } finally {
   ```
   the reason might be a RuntimeException thrown out of ReferenceConfigTest  line 118:
   ```
   2021-09-04T15:32:54.4747828Z [04/09/21 15:32:54:400 UTC] main  WARN integration.DynamicDirectory:  [DUBBO] unexpected error when unregister service org.apache.dubbo.config.api.DemoServicefrom registryzookeeper://localhost:36237/org.apache.dubbo.registry.RegistryService?application=test-reference-retry&dubbo=2.0.2&interface=org.apache.dubbo.registry.RegistryService&pid=9096&release=2.7.14-SNAPSHOT&tag1=value1&tag2=value2&tag3=value3&timestamp=1630769573778, dubbo version: 2.7.14-SNAPSHOT, current host: 172.18.64.1
   2021-09-04T15:32:54.4753549Z java.lang.RuntimeException
   2021-09-04T15:32:54.4755171Z 	at org.apache.dubbo.common.function.ThrowableFunction.execute(ThrowableFunction.java:54)
   2021-09-04T15:32:54.4760684Z 	at org.apache.dubbo.common.function.ThrowableFunction.execute(ThrowableFunction.java:69)
   2021-09-04T15:32:54.4764242Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.doInServiceDiscovery(ZookeeperServiceDiscovery.java:190)
   2021-09-04T15:32:54.4769705Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.getServices(ZookeeperServiceDiscovery.java:113)
   2021-09-04T15:32:54.4773249Z 	at org.apache.dubbo.registry.client.EventPublishingServiceDiscovery.getServices(EventPublishingServiceDiscovery.java:192)
   2021-09-04T15:32:54.4776688Z 	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.isAvailable(ServiceDiscoveryRegistry.java:307)
   2021-09-04T15:32:54.4780044Z 	at org.apache.dubbo.registry.ListenerRegistryWrapper.isAvailable(ListenerRegistryWrapper.java:46)
   2021-09-04T15:32:54.4782684Z 	at org.apache.dubbo.registry.integration.DynamicDirectory.destroy(DynamicDirectory.java:232)
   2021-09-04T15:32:54.4785253Z 	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.destroy(AbstractClusterInvoker.java:112)
   2021-09-04T15:32:54.4787941Z 	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.destroy(AbstractCluster.java:118)
   2021-09-04T15:32:54.4790714Z 	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.destroy(MockClusterInvoker.java:78)
   2021-09-04T15:32:54.4793452Z 	at org.apache.dubbo.registry.client.migration.MigrationInvoker.destroy(MigrationInvoker.java:195)
   2021-09-04T15:32:54.4796742Z 	at org.apache.dubbo.config.ReferenceConfig.checkInvokerAvailable(ReferenceConfig.java:421)
   2021-09-04T15:32:54.4799064Z 	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:323)
   2021-09-04T15:32:54.4800871Z 	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:206)
   2021-09-04T15:32:54.4803180Z 	at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:118)
   ```
   see the whole Unit Test On windows-2019 (JDK: 8)   job logs:  https://github.com/apache/dubbo/runs/3513846068?check_suite_focus=true  




-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r705983347



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       in branch 3.0, ReferenceConfigTest testReferenceRetry()  uses InjvmProtocol.getInjvmProtocol().export(...) instead of  sc.export(), it doesn't call RegistryProtocol.doOverrideIfNecessary at all, so 3.0 might also have the same issue. 




-- 
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] codecov-commenter edited a comment on pull request #8683: [master] fix destroy NullPointerException and doOverrideIfNecessary

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#issuecomment-913098208


   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#8683](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e09ea60) into [master](https://codecov.io/gh/apache/dubbo/commit/7d95364a4d605cf21d077882724340b749b4e63b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7d95364) will **increase** coverage by `0.03%`.
   > The diff coverage is `80.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8683/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8683      +/-   ##
   ============================================
   + Coverage     61.03%   61.07%   +0.03%     
   + Complexity      448      447       -1     
   ============================================
     Files          1097     1097              
     Lines         44398    44406       +8     
     Branches       6466     6469       +3     
   ============================================
   + Hits          27098    27119      +21     
   + Misses        14317    14301      -16     
   - Partials       2983     2986       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...a/org/apache/dubbo/rpc/model/ApplicationModel.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvQXBwbGljYXRpb25Nb2RlbC5qYXZh) | `75.00% <75.00%> (ø)` | |
   | [...e/dubbo/registry/integration/RegistryProtocol.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9SZWdpc3RyeVByb3RvY29sLmphdmE=) | `62.31% <83.33%> (+2.00%)` | :arrow_up: |
   | [...ava/org/apache/dubbo/config/DubboShutdownHook.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9EdWJib1NodXRkb3duSG9vay5qYXZh) | `84.61% <0.00%> (-3.85%)` | :arrow_down: |
   | [...port/identifier/BaseServiceMetadataIdentifier.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvaWRlbnRpZmllci9CYXNlU2VydmljZU1ldGFkYXRhSWRlbnRpZmllci5qYXZh) | `57.14% <0.00%> (-3.58%)` | :arrow_down: |
   | [...he/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eVNlcnZlci5qYXZh) | `70.17% <0.00%> (-3.51%)` | :arrow_down: |
   | [...g/apache/dubbo/registry/consul/ConsulRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktY29uc3VsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jb25zdWwvQ29uc3VsUmVnaXN0cnkuamF2YQ==) | `60.00% <0.00%> (-0.59%)` | :arrow_down: |
   | [...apache/dubbo/common/extension/ExtensionLoader.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vZXh0ZW5zaW9uL0V4dGVuc2lvbkxvYWRlci5qYXZh) | `80.89% <0.00%> (-0.43%)` | :arrow_down: |
   | [...he/dubbo/registry/multicast/MulticastRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktbXVsdGljYXN0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9tdWx0aWNhc3QvTXVsdGljYXN0UmVnaXN0cnkuamF2YQ==) | `68.37% <0.00%> (+0.93%)` | :arrow_up: |
   | [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `80.37% <0.00%> (+2.22%)` | :arrow_up: |
   | ... and [2 more](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7d95364...e09ea60](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704070879



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       one report of github say NPE occurred at here:
   ```
   2021-09-04T18:15:20.5853500Z java.lang.NullPointerException
   2021-09-04T18:15:20.5855218Z at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:691)
   2021-09-04T18:15:20.5857572Z at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.notify(RegistryProtocol.java:672)
   2021-09-04T18:15:20.5859640Z at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:429)
   2021-09-04T18:15:20.5861641Z at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:372)
   2021-09-04T18:15:20.5863623Z at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
   2021-09-04T18:15:20.5865836Z at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:181)
   2021-09-04T18:15:20.5868092Z at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
   2021-09-04T18:15:20.5870274Z at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
   2021-09-04T18:15:20.5872504Z at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:232)
   2021-09-04T18:15:20.5874770Z at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
   2021-09-04T18:15:20.5877025Z at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:73)
   2021-09-04T18:15:20.5878629Z at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
   2021-09-04T18:15:20.5880268Z at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:518)
   2021-09-04T18:15:20.5882154Z at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:339)
   2021-09-04T18:15:20.5883655Z at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:314)
   2021-09-04T18:15:20.5885108Z at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:238)
   2021-09-04T18:15:20.5886991Z at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:135)
   ```
   at org.apache.dubbo.config.ReferenceConfigTest testReferenceRetry():
   ```
           try {
               System.setProperty("java.net.preferIPv4Stack", "true");
               sc.export();  <=== throw NPE here
               demoService = rc.get();
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           } 
   ```
   ReferenceConfigTest.java version: https://github.com/zrlw/dubbo/commit/dee73739695b0882b099ad0d6c595a4f867933ba




-- 
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] codecov-commenter edited a comment on pull request #8683: [master] fix destroy NullPointerException and doOverrideIfNecessary

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#issuecomment-913098208


   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#8683](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e09ea60) into [master](https://codecov.io/gh/apache/dubbo/commit/7d95364a4d605cf21d077882724340b749b4e63b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7d95364) will **decrease** coverage by `0.66%`.
   > The diff coverage is `80.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8683/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8683      +/-   ##
   ============================================
   - Coverage     61.03%   60.36%   -0.67%     
   + Complexity      448      447       -1     
   ============================================
     Files          1097     1097              
     Lines         44398    44406       +8     
     Branches       6466     6469       +3     
   ============================================
   - Hits          27098    26807     -291     
   - Misses        14317    14616     +299     
     Partials       2983     2983              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...a/org/apache/dubbo/rpc/model/ApplicationModel.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvQXBwbGljYXRpb25Nb2RlbC5qYXZh) | `75.00% <75.00%> (ø)` | |
   | [...e/dubbo/registry/integration/RegistryProtocol.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9SZWdpc3RyeVByb3RvY29sLmphdmE=) | `62.31% <83.33%> (+2.00%)` | :arrow_up: |
   | [...gcenter/wrapper/CompositeDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci93cmFwcGVyL0NvbXBvc2l0ZUR5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (-73.34%)` | :arrow_down: |
   | [...ookeeper/ZookeeperDynamicConfigurationFactory.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbkZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [...pport/zookeeper/ZookeeperDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `0.00% <0.00%> (-62.86%)` | :arrow_down: |
   | [...fig/configcenter/TreePathDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9UcmVlUGF0aER5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `31.42% <0.00%> (-54.29%)` | :arrow_down: |
   | [.../dubbo/metadata/report/MetadataReportInstance.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvTWV0YWRhdGFSZXBvcnRJbnN0YW5jZS5qYXZh) | `12.50% <0.00%> (-40.63%)` | :arrow_down: |
   | [.../configcenter/support/zookeeper/CacheListener.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9DYWNoZUxpc3RlbmVyLmphdmE=) | `0.00% <0.00%> (-34.29%)` | :arrow_down: |
   | [...gistry/client/migration/MigrationRuleListener.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWlncmF0aW9uL01pZ3JhdGlvblJ1bGVMaXN0ZW5lci5qYXZh) | `55.88% <0.00%> (-23.53%)` | :arrow_down: |
   | [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `62.06% <0.00%> (-20.69%)` | :arrow_down: |
   | ... and [37 more](https://codecov.io/gh/apache/dubbo/pull/8683/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7d95364...e09ea60](https://codecov.io/gh/apache/dubbo/pull/8683?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
zrlw commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704070879



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       one report of github say NPE occurred at here:
   ```
   2021-09-04T18:15:20.5853500Z java.lang.NullPointerException
   2021-09-04T18:15:20.5855218Z at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:691)
   2021-09-04T18:15:20.5857572Z at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.notify(RegistryProtocol.java:672)
   2021-09-04T18:15:20.5859640Z at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:429)
   2021-09-04T18:15:20.5861641Z at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:372)
   2021-09-04T18:15:20.5863623Z at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364)
   2021-09-04T18:15:20.5865836Z at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:181)
   2021-09-04T18:15:20.5868092Z at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:299)
   2021-09-04T18:15:20.5870274Z at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
   2021-09-04T18:15:20.5872504Z at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:232)
   2021-09-04T18:15:20.5874770Z at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
   2021-09-04T18:15:20.5877025Z at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:73)
   2021-09-04T18:15:20.5878629Z at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
   2021-09-04T18:15:20.5880268Z at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:518)
   2021-09-04T18:15:20.5882154Z at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:339)
   2021-09-04T18:15:20.5883655Z at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:314)
   2021-09-04T18:15:20.5885108Z at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:238)
   2021-09-04T18:15:20.5886991Z at org.apache.dubbo.config.ReferenceConfigTest.testReferenceRetry(ReferenceConfigTest.java:135)
   ```
   at org.apache.dubbo.config.ReferenceConfigTest testReferenceRetry():
   ```
           try {
               System.setProperty("java.net.preferIPv4Stack", "true");
               sc.export();  <=== throw NPE here
               demoService = rc.get();
               success = true;
           } catch (Exception e) {
               e.printStackTrace();
           } 
   ```
   ReferenceConfigTest.java version: https://github.com/apache/dubbo/pull/7754




-- 
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] AlbumenJ merged pull request #8683: [master] fix destroy IllegalStateException and doOverrideIfNecessary NPE

Posted by GitBox <gi...@apache.org>.
AlbumenJ merged pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683


   


-- 
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] AlbumenJ commented on a change in pull request #8683: [master] fix destroy NPE and doOverrideIfNecessary IllegalStateException

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on a change in pull request #8683:
URL: https://github.com/apache/dubbo/pull/8683#discussion_r704031605



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
##########
@@ -688,7 +693,8 @@ public synchronized void doOverrideIfNecessary() {
                 return;
             }
             //The current, may have been merged many times
-            URL currentUrl = exporter.getInvoker().getUrl();
+            Invoker<?> exporterInvoker = exporter.getInvoker();

Review comment:
       exporterInvoker should not be null here when calling `doOverrideIfNecessary`




-- 
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