Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重构 ServiceBean 的 isDelay 方法,使其更符合语义 #2686

Merged
merged 2 commits into from
Oct 30, 2018

Conversation

code4wt
Copy link
Contributor

@code4wt code4wt commented Oct 25, 2018

isDelay 方法目前返回值如下:

  • true: delay == null || delay == -1,表示不延迟导出服务
  • false: delay > 0,表示延迟导出服务

我觉得 isDelay 方法返回值如下时,更合理一些:

  • true: 延迟导出服务
  • false: 无需延迟导出服务

What is the purpose of the change

Fix the wrong meaning of the method isDelay

@code4wt code4wt changed the title 重构 ServiceBean 的 isDelay,使其更符合语义 重构 ServiceBean 的 isDelay 方法,使其更符合语义 Oct 25, 2018
@codecov-io
Copy link

codecov-io commented Oct 25, 2018

Codecov Report

Merging #2686 into master will increase coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2686      +/-   ##
==========================================
+ Coverage   63.24%   63.29%   +0.04%     
==========================================
  Files         573      578       +5     
  Lines       25763    25958     +195     
  Branches     4533     4545      +12     
==========================================
+ Hits        16294    16430     +136     
- Misses       7320     7365      +45     
- Partials     2149     2163      +14
Impacted Files Coverage Δ
...va/org/apache/dubbo/config/spring/ServiceBean.java 47.65% <0%> (-2.72%) ⬇️
...a/org/apache/dubbo/rpc/filter/AccessLogFilter.java 52.22% <0%> (-18.89%) ⬇️
...ache/dubbo/remoting/transport/AbstractChannel.java 75% <0%> (-12.5%) ⬇️
...org/apache/dubbo/rpc/filter/ActiveLimitFilter.java 77.77% <0%> (-11.12%) ⬇️
...rpc/cluster/loadbalance/RoundRobinLoadBalance.java 85.29% <0%> (-8.46%) ⬇️
...e/dubbo/remoting/transport/netty/NettyChannel.java 54.11% <0%> (-8.24%) ⬇️
.../apache/dubbo/remoting/transport/AbstractPeer.java 63.04% <0%> (-4.35%) ⬇️
...rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java 54.21% <0%> (-3.62%) ⬇️
...he/dubbo/remoting/transport/netty/NettyServer.java 67.85% <0%> (-3.58%) ⬇️
...org/apache/dubbo/rpc/protocol/AbstractInvoker.java 59.67% <0%> (-3.23%) ⬇️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7286e23...2f1b767. Read the comment docs.

@beiwei30
Copy link
Member

@code4wt In fact, I believe isDelay() is unnecessary any longer in ServiceBean. Here's the reason, the method export in ServiceConfig should have already covered this logic:

    public synchronized void export() {
        if (provider != null) {
            if (export == null) {
                export = provider.getExport();
            }
            if (delay == null) {
                delay = provider.getDelay();
            }
        }
        if (export != null && !export) {
            return;
        }

        if (delay != null && delay > 0) {
            delayExportExecutor.schedule(new Runnable() {
                @Override
                public void run() {
                    doExport();
                }
            }, delay, TimeUnit.MILLISECONDS);
        } else {
            doExport();
        }
    }

But I agree we need to enhance ServiceBean since the current logic is confusing, what I propose is:

@@ -107,7 +107,7 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean
 
     @Override
     public void onApplicationEvent(ContextRefreshedEvent event) {
-        if (isDelay() && !isExported() && !isUnexported()) {
+        if (!isExported() && !isUnexported()) {^M
             if (logger.isInfoEnabled()) {
                 logger.info("The service ready on spring started. service: " + getInterface());
             }
@@ -115,15 +115,6 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean
         }
     }
 
-    private boolean isDelay() {
-        Integer delay = getDelay();
-        ProviderConfig provider = getProvider();
-        if (delay == null && provider != null) {
-            delay = provider.getDelay();
-        }
-        return supportedApplicationListener && (delay == null || delay == -1);
-    }
-
     @Override
     @SuppressWarnings({"unchecked", "deprecation"})
     public void afterPropertiesSet() throws Exception {
@@ -251,7 +242,7 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean
                 setPath(beanName);
             }
         }
-        if (!isDelay()) {
+        if (!supportedApplicationListener) {^M
             export();
         }
     }

Pls. take a look. If you agree with this, would you mind to revise your pull request?

@beiwei30 beiwei30 added the status/waiting-for-feedback Need reporters to triage label Oct 30, 2018
@code4wt
Copy link
Contributor Author

code4wt commented Oct 30, 2018

@code4wt In fact, I believe isDelay() is unnecessary any longer in ServiceBean. Here's the reason, the method export in ServiceConfig should have already covered this logic:

    public synchronized void export() {
        if (provider != null) {
            if (export == null) {
                export = provider.getExport();
            }
            if (delay == null) {
                delay = provider.getDelay();
            }
        }
        if (export != null && !export) {
            return;
        }

        if (delay != null && delay > 0) {
            delayExportExecutor.schedule(new Runnable() {
                @Override
                public void run() {
                    doExport();
                }
            }, delay, TimeUnit.MILLISECONDS);
        } else {
            doExport();
        }
    }

But I agree we need to enhance ServiceBean since the current logic is confusing, what I propose is:

@@ -107,7 +107,7 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean
 
     @Override
     public void onApplicationEvent(ContextRefreshedEvent event) {
-        if (isDelay() && !isExported() && !isUnexported()) {
+        if (!isExported() && !isUnexported()) {^M
             if (logger.isInfoEnabled()) {
                 logger.info("The service ready on spring started. service: " + getInterface());
             }
@@ -115,15 +115,6 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean
         }
     }
 
-    private boolean isDelay() {
-        Integer delay = getDelay();
-        ProviderConfig provider = getProvider();
-        if (delay == null && provider != null) {
-            delay = provider.getDelay();
-        }
-        return supportedApplicationListener && (delay == null || delay == -1);
-    }
-
     @Override
     @SuppressWarnings({"unchecked", "deprecation"})
     public void afterPropertiesSet() throws Exception {
@@ -251,7 +242,7 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean
                 setPath(beanName);
             }
         }
-        if (!isDelay()) {
+        if (!supportedApplicationListener) {^M
             export();
         }
     }

Pls. take a look. If you agree with this, would you mind to revise your pull request?

Thanks to review this PR. I agree with you, isDelay really is an unnecessary method. I have revised my PR , pls check.

@beiwei30
Copy link
Member

good job, thanks.

@beiwei30 beiwei30 merged commit 4d0a36c into apache:master Oct 30, 2018
@zonghaishang
Copy link
Member

What if you want to expose the service 10 seconds after the spring container started ?
The original intention delay = 10000 represents execution after 10 seconds.

@beiwei30 @code4wt @chickenlj please help check that.

public synchronized void export() {
    if (delay != null && delay > 0) {
        // 
        delayExportExecutor.schedule(new Runnable() {
            @Override
            public void run() {
                doExport();
            }
        }, delay, TimeUnit.MILLISECONDS);
    } else {
        doExport();
    }
}

@beiwei30
Copy link
Member

beiwei30 commented Nov 1, 2018

I think this behavior is expected. The reason is, the best timing for Dubbo to count down delay for exposing service is when Spring container is ready, then this timing should be the moment when spring context gets refreshed, since at this moment, all beans are settled, and are ready for wiring in their dependencies. If it happens earlier, say, at the moment after properties set, then Dubbo may fail to expose service because it depends on other spring bean.

To conclude, Dubbo should start to expose services until spring context gets refreshed, no matter delay or no-delay is configured. Unfortunately in order to keep backward compatibility, considering not all spring versions support context refresh callback, we have to start to expose services after properties set if we find application listener is not supported, and hope Dubbo service can be exposed normally.

I hope this can clarify the behavior.

@jarvisxiong
Copy link

赞,最近看这块有些别扭。

CrazyHZM pushed a commit to CrazyHZM/dubbo that referenced this pull request Dec 6, 2018
* Refactor method isDelay of ServiceBean to fix the wrong meaning of the method

* Remove unnecessary method isDelay of ServiceBean
CrazyHZM added a commit to CrazyHZM/dubbo that referenced this pull request Dec 6, 2018
* combine test coverage report (apache#2643)

* Optimize ut for serialization model. (apache#2632)

* 1. Integrate the unit test of the serialization module, code reuse.
2. Remove redundant unit tests and pojo classes.
3. Remove the useless pojo class in the common module.

* fix ci fail

* fix ci fail

* fix ci fail

* fix ci fail

* remove author info

* prototype for issue2570 (apache#2640)

* apache#2570: dubbo all in one fail to start from a tomcat server when spring framework is absent

* add comments and fix unit test

* add license header

* update comments in unit tests

* [Dubbo -fix annotation bug] Fix @reference bug (apache#2649)

It's fine.

* Merge pull request apache#2656, make sure serialization exception sends back to consumer to preventing endless waiting.

Fixes apache#1903: Our customized serialization id exceeds the maximum limit, now it cannot work on 2.6.2 anymore.

*     apache#1903: supplemental change (apache#2666)

* Optimize the doSelect method of RandomLoadBalance to reduce the times of invoke of the getWeight method of the AbstractLoadBalance (apache#2597)

* 解决与quartz集成报错问题 (apache#2677)

quartz初始化的Bean没有beanName,beanName=null,走这段代码的时候报空指针了。
org.springframework.boot.autoconfigure.quartz.AutowireCapableBeanJobFactory类的createJobInstance方法中使用this.beanFactory.initializeBean(jobInstance, null);初始化的Bean,其beanName=null。

* Code format (apache#2662)

* NullPointerException

* code rule

* Merge pull request#2679, consumer throws RpcException when RegistryDirectory notify in high QPS.

Fixes apache#2016

* remove ServiceClassHolder and use the ApplicationModel replacedly (apache#2646)

* [Dubbo] move the classes of model from config to rpc-api for reusing

* remove ServiceClassHolder and use the ApplicationModel replacedly

* [Dubbo] delete the unused imported of ApplicationModel

* Update dubbo-demo-consumer.xml

this commits is no need to commit to remote repo.

* [Dubbo-1983] Support Protobuf Serialization (apache#2618)

* finish support protobuf

* polish

* fix code review

* use the general test for serialization

* Smooth Round Robin selection (apache#2650)

* enhance pull request 2618 (apache#2691)

* enhance pull request 2618

* move spi file into the right directory

* ignore protostuff test case

* make unit test pass, support Time type

* fix useless imports issue

* add license header

* fix typo error in FAQ (apache#2684)

fix typo error in FAQ

* remove author info for RoundRobinLoadBalance (apache#2697)

* fix pom for protostuff serialization (apache#2700)

* Optimize REGISTRIES field in AbstractRegistryFactory. (apache#2703)

* modify ConcurrentHashMap to HashMap.这里REGISTRIES在使用的时候都会先加锁,不存在多线程安全的问题。所以这里建议使用hashmap

* modify ConcurrentHashMap to HashMap.这里REGISTRIES在使用的时候都会先加锁,不存在多线程安全的问题。所以这里建议使用hashmap

* [version 2.7.0]remove the StaticContext class and refactor the code related to Async (apache#2688)

* [Dubbo] move the classes of model from config to rpc-api for reusing

* remove ServiceClassHolder and use the ApplicationModel replacedly

* [Dubbo] delete the unused imported of ApplicationModel

* Update dubbo-demo-consumer.xml

this commits is no need to commit to remote repo.

* remove StaticContext

* remove the unused imported classes of ReferenceConfig

* fix NPE of ConsumerModel

* fix the failed testcase of AbstractClusterInvokerTest

* [Dubbo] #PR2688 to fix the review issues

* Optimize heartbeat and reconnect task. (apache#2658)

* Optimize heartbeat and reconnect task.
1.Use hashedWheelTimer.
2.Distinguish between reconnect and heartbeat.
3.Increase inspection cycle.

* fix ci fail.

* fix ci fail.

* fix ci fail.

* polish the code for pull request 2658: Optimize heartbeat and reconnect task (apache#2709)

* 重构 ServiceBean 的 isDelay 方法,使其更符合语义 (apache#2686)

* Refactor method isDelay of ServiceBean to fix the wrong meaning of the method

* Remove unnecessary method isDelay of ServiceBean

* 【Unit Test】FailbackRegistry Test: recover method (apache#2591)

* FailbackRegistry Test: recover method

* fix the type error, and use CountDownLatch await method to fix the unstable problom

* trigger the travis ci test retry

* trigger the code static check again

* replace ServiceAnnotationBeanPostProcessor log.isInfoEnabled->log.isWarnEnabled (apache#2712)

simplify ExtensionLoader code segment

* [Dubbo-2678][For Master] Add ability to turn off SPI auto injection, special support for Object type.  (apache#2682)

* Add ability to turn off SPI auto injection, special support for generic Object type injection.

* Change Inject to AutoInject since it's main purpose is to turn off auto-injection.

* disable is redundant in DisableInject annotation

* Merge pull request apache#2725, problems of graceful shutdown in 2.6.3 and some recommendation.

* enhance comments (apache#2735)

* code format (apache#2730)

* NullPointerException

* code rule

* code rule

* Close all servers/ports after tests finish (apache#2741)

*  Simplify the code of StringUtils to make it more graceful. (apache#2740)

* Simplify the code of StringUtils to make it more graceful.

* Add Apache license

* Add 'forks' config into xml config (apache#2568)

* Add forks into xml config.

* Add forks into xml config.

* Add forks into xml config.

* fix typo (apache#2747)

* [DUBBO-2489] MockClusterInvoker provides local forced mock,I tested it locally, but it doesn't work (apache#2742)

*     apache#2748: Provider should disable mock configuration (apache#2749)

* Fix the bug that ReferenceBean refers service more than once when debugging. (apache#2754)

note:
please visit http://t.cn/EAhta27 for more detail.

* Close all servers/ports after tests finish (apache#2755)

* add checkstyle rule to check import order (apache#2745)

* Changing URL so tests can run in any order (apache#2760)

* [Dubbo-2353]fix Invalid property 'interfaceName' of bean class [org.apache.dubbo.config.spring.ServiceBean]apache#2353 (apache#2418)

* add getter and setter for ServiceConfig's interfaceName property#2353

* add interfaceName to ignoreAttributeNames and change the unit test

* delete the demo source code and update the unit test

* unchange ServiceConfig

* update unit test

* update unit test

*     apache#2762: [Dubbo - qos-http] stopServer should be invoked ? (apache#2767)

*     apache#2777: heartbeat threads blocks process shutdown (apache#2778)

Fix heartbeat threads blocks process shutdown because its hashed-wheel-timer is non-daemon thread.

* oschina vote (apache#2786)

* fix typo (apache#2791)

Fix typo confilict -> conflict

* improvement on Parameters and CollectionUtils (apache#2790)

Use CollectionUtils.toStringMap to reduce duplicate code in Parameters, and use Java 8 type inference for collections.

* [REFACTOR]:[fix typo] (apache#2804)

fix typos

* [Dubbo-2798]fix apporiate NotWritablePropertyException (apache#2800)

fix apache#2798 .
'propertyname in java donot contain '-' but camel format'.

* [Dubbo-2758] Adding dependency on dubbo-remoting-mina for tests in dubbo-rpc-dubbo (apache#2797)

* Adding dependency on dubbo-remoting-mina so DubboProtocolTest.testDubboProtocolWithMina is no longer flaky

* Changing port number to ensure new server/client created for test

* modify dubbo version to 2.6.5

* fix typo of field (apache#2825)

* [Dubbo-2845] Fix OOM in UT testSelectByWeight (apache#2845) (apache#2846)

Fix OOM Exception generated during UT

* Fix UT failed on windows with FileNetworkerTest (apache#2848)

Fix FileNetworkerTest failure

* Update README.md

remove oschina vote

* fixed typo of variable (apache#2875)

fixed type of variable

* Remove unnessesary code  in RegistryDirectory#doList (apache#2861)

* remove unnessesary code

* remove unused import

* add some ScriptRoute test case (apache#2879)

* add router test case

* correct an error word

* remove the duplicate superclass of TagRouter and ConditionRouter (apache#2885)

Remove the class ConditionRouter and TagRouter implement duplicate superclass Comparable
CrazyHZM added a commit to CrazyHZM/dubbo that referenced this pull request Dec 6, 2018
* combine test coverage report (apache#2643)

* Optimize ut for serialization model. (apache#2632)

* 1. Integrate the unit test of the serialization module, code reuse.
2. Remove redundant unit tests and pojo classes.
3. Remove the useless pojo class in the common module.

* fix ci fail

* fix ci fail

* fix ci fail

* fix ci fail

* remove author info

* prototype for issue2570 (apache#2640)

* apache#2570: dubbo all in one fail to start from a tomcat server when spring framework is absent

* add comments and fix unit test

* add license header

* update comments in unit tests

* [Dubbo -fix annotation bug] Fix @reference bug (apache#2649)

It's fine.

* Merge pull request apache#2656, make sure serialization exception sends back to consumer to preventing endless waiting.

Fixes apache#1903: Our customized serialization id exceeds the maximum limit, now it cannot work on 2.6.2 anymore.

*     apache#1903: supplemental change (apache#2666)

* Optimize the doSelect method of RandomLoadBalance to reduce the times of invoke of the getWeight method of the AbstractLoadBalance (apache#2597)

* 解决与quartz集成报错问题 (apache#2677)

quartz初始化的Bean没有beanName,beanName=null,走这段代码的时候报空指针了。
org.springframework.boot.autoconfigure.quartz.AutowireCapableBeanJobFactory类的createJobInstance方法中使用this.beanFactory.initializeBean(jobInstance, null);初始化的Bean,其beanName=null。

* Code format (apache#2662)

* NullPointerException

* code rule

* Merge pull request#2679, consumer throws RpcException when RegistryDirectory notify in high QPS.

Fixes apache#2016

* remove ServiceClassHolder and use the ApplicationModel replacedly (apache#2646)

* [Dubbo] move the classes of model from config to rpc-api for reusing

* remove ServiceClassHolder and use the ApplicationModel replacedly

* [Dubbo] delete the unused imported of ApplicationModel

* Update dubbo-demo-consumer.xml

this commits is no need to commit to remote repo.

* [Dubbo-1983] Support Protobuf Serialization (apache#2618)

* finish support protobuf

* polish

* fix code review

* use the general test for serialization

* Smooth Round Robin selection (apache#2650)

* enhance pull request 2618 (apache#2691)

* enhance pull request 2618

* move spi file into the right directory

* ignore protostuff test case

* make unit test pass, support Time type

* fix useless imports issue

* add license header

* fix typo error in FAQ (apache#2684)

fix typo error in FAQ

* remove author info for RoundRobinLoadBalance (apache#2697)

* fix pom for protostuff serialization (apache#2700)

* Optimize REGISTRIES field in AbstractRegistryFactory. (apache#2703)

* modify ConcurrentHashMap to HashMap.这里REGISTRIES在使用的时候都会先加锁,不存在多线程安全的问题。所以这里建议使用hashmap

* modify ConcurrentHashMap to HashMap.这里REGISTRIES在使用的时候都会先加锁,不存在多线程安全的问题。所以这里建议使用hashmap

* [version 2.7.0]remove the StaticContext class and refactor the code related to Async (apache#2688)

* [Dubbo] move the classes of model from config to rpc-api for reusing

* remove ServiceClassHolder and use the ApplicationModel replacedly

* [Dubbo] delete the unused imported of ApplicationModel

* Update dubbo-demo-consumer.xml

this commits is no need to commit to remote repo.

* remove StaticContext

* remove the unused imported classes of ReferenceConfig

* fix NPE of ConsumerModel

* fix the failed testcase of AbstractClusterInvokerTest

* [Dubbo] #PR2688 to fix the review issues

* Optimize heartbeat and reconnect task. (apache#2658)

* Optimize heartbeat and reconnect task.
1.Use hashedWheelTimer.
2.Distinguish between reconnect and heartbeat.
3.Increase inspection cycle.

* fix ci fail.

* fix ci fail.

* fix ci fail.

* polish the code for pull request 2658: Optimize heartbeat and reconnect task (apache#2709)

* 重构 ServiceBean 的 isDelay 方法,使其更符合语义 (apache#2686)

* Refactor method isDelay of ServiceBean to fix the wrong meaning of the method

* Remove unnecessary method isDelay of ServiceBean

* 【Unit Test】FailbackRegistry Test: recover method (apache#2591)

* FailbackRegistry Test: recover method

* fix the type error, and use CountDownLatch await method to fix the unstable problom

* trigger the travis ci test retry

* trigger the code static check again

* replace ServiceAnnotationBeanPostProcessor log.isInfoEnabled->log.isWarnEnabled (apache#2712)

simplify ExtensionLoader code segment

* [Dubbo-2678][For Master] Add ability to turn off SPI auto injection, special support for Object type.  (apache#2682)

* Add ability to turn off SPI auto injection, special support for generic Object type injection.

* Change Inject to AutoInject since it's main purpose is to turn off auto-injection.

* disable is redundant in DisableInject annotation

* Merge pull request apache#2725, problems of graceful shutdown in 2.6.3 and some recommendation.

* enhance comments (apache#2735)

* code format (apache#2730)

* NullPointerException

* code rule

* code rule

* Close all servers/ports after tests finish (apache#2741)

*  Simplify the code of StringUtils to make it more graceful. (apache#2740)

* Simplify the code of StringUtils to make it more graceful.

* Add Apache license

* Add 'forks' config into xml config (apache#2568)

* Add forks into xml config.

* Add forks into xml config.

* Add forks into xml config.

* fix typo (apache#2747)

* [DUBBO-2489] MockClusterInvoker provides local forced mock,I tested it locally, but it doesn't work (apache#2742)

*     apache#2748: Provider should disable mock configuration (apache#2749)

* Fix the bug that ReferenceBean refers service more than once when debugging. (apache#2754)

note:
please visit http://t.cn/EAhta27 for more detail.

* Close all servers/ports after tests finish (apache#2755)

* add checkstyle rule to check import order (apache#2745)

* Changing URL so tests can run in any order (apache#2760)

* [Dubbo-2353]fix Invalid property 'interfaceName' of bean class [org.apache.dubbo.config.spring.ServiceBean]apache#2353 (apache#2418)

* add getter and setter for ServiceConfig's interfaceName property#2353

* add interfaceName to ignoreAttributeNames and change the unit test

* delete the demo source code and update the unit test

* unchange ServiceConfig

* update unit test

* update unit test

*     apache#2762: [Dubbo - qos-http] stopServer should be invoked ? (apache#2767)

*     apache#2777: heartbeat threads blocks process shutdown (apache#2778)

Fix heartbeat threads blocks process shutdown because its hashed-wheel-timer is non-daemon thread.

* oschina vote (apache#2786)

* fix typo (apache#2791)

Fix typo confilict -> conflict

* improvement on Parameters and CollectionUtils (apache#2790)

Use CollectionUtils.toStringMap to reduce duplicate code in Parameters, and use Java 8 type inference for collections.

* [REFACTOR]:[fix typo] (apache#2804)

fix typos

* [Dubbo-2798]fix apporiate NotWritablePropertyException (apache#2800)

fix apache#2798 .
'propertyname in java donot contain '-' but camel format'.

* [Dubbo-2758] Adding dependency on dubbo-remoting-mina for tests in dubbo-rpc-dubbo (apache#2797)

* Adding dependency on dubbo-remoting-mina so DubboProtocolTest.testDubboProtocolWithMina is no longer flaky

* Changing port number to ensure new server/client created for test

* modify dubbo version to 2.6.5

* fix typo of field (apache#2825)

* [Dubbo-2845] Fix OOM in UT testSelectByWeight (apache#2845) (apache#2846)

Fix OOM Exception generated during UT

* Fix UT failed on windows with FileNetworkerTest (apache#2848)

Fix FileNetworkerTest failure

* Update README.md

remove oschina vote

* fixed typo of variable (apache#2875)

fixed type of variable

* Remove unnessesary code  in RegistryDirectory#doList (apache#2861)

* remove unnessesary code

* remove unused import

* add some ScriptRoute test case (apache#2879)

* add router test case

* correct an error word

* remove the duplicate superclass of TagRouter and ConditionRouter (apache#2885)

Remove the class ConditionRouter and TagRouter implement duplicate superclass Comparable
CrazyHZM added a commit to CrazyHZM/dubbo that referenced this pull request Dec 6, 2018
* combine test coverage report (apache#2643)

* Optimize ut for serialization model. (apache#2632)

* 1. Integrate the unit test of the serialization module, code reuse.
2. Remove redundant unit tests and pojo classes.
3. Remove the useless pojo class in the common module.

* fix ci fail

* fix ci fail

* fix ci fail

* fix ci fail

* remove author info

* prototype for issue2570 (apache#2640)

* apache#2570: dubbo all in one fail to start from a tomcat server when spring framework is absent

* add comments and fix unit test

* add license header

* update comments in unit tests

* [Dubbo -fix annotation bug] Fix @reference bug (apache#2649)

It's fine.

* Merge pull request apache#2656, make sure serialization exception sends back to consumer to preventing endless waiting.

Fixes apache#1903: Our customized serialization id exceeds the maximum limit, now it cannot work on 2.6.2 anymore.

*     apache#1903: supplemental change (apache#2666)

* Optimize the doSelect method of RandomLoadBalance to reduce the times of invoke of the getWeight method of the AbstractLoadBalance (apache#2597)

* 解决与quartz集成报错问题 (apache#2677)

quartz初始化的Bean没有beanName,beanName=null,走这段代码的时候报空指针了。
org.springframework.boot.autoconfigure.quartz.AutowireCapableBeanJobFactory类的createJobInstance方法中使用this.beanFactory.initializeBean(jobInstance, null);初始化的Bean,其beanName=null。

* Code format (apache#2662)

* NullPointerException

* code rule

* Merge pull request#2679, consumer throws RpcException when RegistryDirectory notify in high QPS.

Fixes apache#2016

* remove ServiceClassHolder and use the ApplicationModel replacedly (apache#2646)

* [Dubbo] move the classes of model from config to rpc-api for reusing

* remove ServiceClassHolder and use the ApplicationModel replacedly

* [Dubbo] delete the unused imported of ApplicationModel

* Update dubbo-demo-consumer.xml

this commits is no need to commit to remote repo.

* [Dubbo-1983] Support Protobuf Serialization (apache#2618)

* finish support protobuf

* polish

* fix code review

* use the general test for serialization

* Smooth Round Robin selection (apache#2650)

* enhance pull request 2618 (apache#2691)

* enhance pull request 2618

* move spi file into the right directory

* ignore protostuff test case

* make unit test pass, support Time type

* fix useless imports issue

* add license header

* fix typo error in FAQ (apache#2684)

fix typo error in FAQ

* remove author info for RoundRobinLoadBalance (apache#2697)

* fix pom for protostuff serialization (apache#2700)

* Optimize REGISTRIES field in AbstractRegistryFactory. (apache#2703)

* modify ConcurrentHashMap to HashMap.这里REGISTRIES在使用的时候都会先加锁,不存在多线程安全的问题。所以这里建议使用hashmap

* modify ConcurrentHashMap to HashMap.这里REGISTRIES在使用的时候都会先加锁,不存在多线程安全的问题。所以这里建议使用hashmap

* [version 2.7.0]remove the StaticContext class and refactor the code related to Async (apache#2688)

* [Dubbo] move the classes of model from config to rpc-api for reusing

* remove ServiceClassHolder and use the ApplicationModel replacedly

* [Dubbo] delete the unused imported of ApplicationModel

* Update dubbo-demo-consumer.xml

this commits is no need to commit to remote repo.

* remove StaticContext

* remove the unused imported classes of ReferenceConfig

* fix NPE of ConsumerModel

* fix the failed testcase of AbstractClusterInvokerTest

* [Dubbo] #PR2688 to fix the review issues

* Optimize heartbeat and reconnect task. (apache#2658)

* Optimize heartbeat and reconnect task.
1.Use hashedWheelTimer.
2.Distinguish between reconnect and heartbeat.
3.Increase inspection cycle.

* fix ci fail.

* fix ci fail.

* fix ci fail.

* polish the code for pull request 2658: Optimize heartbeat and reconnect task (apache#2709)

* 重构 ServiceBean 的 isDelay 方法,使其更符合语义 (apache#2686)

* Refactor method isDelay of ServiceBean to fix the wrong meaning of the method

* Remove unnecessary method isDelay of ServiceBean

* 【Unit Test】FailbackRegistry Test: recover method (apache#2591)

* FailbackRegistry Test: recover method

* fix the type error, and use CountDownLatch await method to fix the unstable problom

* trigger the travis ci test retry

* trigger the code static check again

* replace ServiceAnnotationBeanPostProcessor log.isInfoEnabled->log.isWarnEnabled (apache#2712)

simplify ExtensionLoader code segment

* [Dubbo-2678][For Master] Add ability to turn off SPI auto injection, special support for Object type.  (apache#2682)

* Add ability to turn off SPI auto injection, special support for generic Object type injection.

* Change Inject to AutoInject since it's main purpose is to turn off auto-injection.

* disable is redundant in DisableInject annotation

* Merge pull request apache#2725, problems of graceful shutdown in 2.6.3 and some recommendation.

* enhance comments (apache#2735)

* code format (apache#2730)

* NullPointerException

* code rule

* code rule

* Close all servers/ports after tests finish (apache#2741)

*  Simplify the code of StringUtils to make it more graceful. (apache#2740)

* Simplify the code of StringUtils to make it more graceful.

* Add Apache license

* Add 'forks' config into xml config (apache#2568)

* Add forks into xml config.

* Add forks into xml config.

* Add forks into xml config.

* fix typo (apache#2747)

* [DUBBO-2489] MockClusterInvoker provides local forced mock,I tested it locally, but it doesn't work (apache#2742)

*     apache#2748: Provider should disable mock configuration (apache#2749)

* Fix the bug that ReferenceBean refers service more than once when debugging. (apache#2754)

note:
please visit http://t.cn/EAhta27 for more detail.

* Close all servers/ports after tests finish (apache#2755)

* add checkstyle rule to check import order (apache#2745)

* Changing URL so tests can run in any order (apache#2760)

* [Dubbo-2353]fix Invalid property 'interfaceName' of bean class [org.apache.dubbo.config.spring.ServiceBean]apache#2353 (apache#2418)

* add getter and setter for ServiceConfig's interfaceName property#2353

* add interfaceName to ignoreAttributeNames and change the unit test

* delete the demo source code and update the unit test

* unchange ServiceConfig

* update unit test

* update unit test

*     apache#2762: [Dubbo - qos-http] stopServer should be invoked ? (apache#2767)

*     apache#2777: heartbeat threads blocks process shutdown (apache#2778)

Fix heartbeat threads blocks process shutdown because its hashed-wheel-timer is non-daemon thread.

* oschina vote (apache#2786)

* fix typo (apache#2791)

Fix typo confilict -> conflict

* improvement on Parameters and CollectionUtils (apache#2790)

Use CollectionUtils.toStringMap to reduce duplicate code in Parameters, and use Java 8 type inference for collections.

* [REFACTOR]:[fix typo] (apache#2804)

fix typos

* [Dubbo-2798]fix apporiate NotWritablePropertyException (apache#2800)

fix apache#2798 .
'propertyname in java donot contain '-' but camel format'.

* [Dubbo-2758] Adding dependency on dubbo-remoting-mina for tests in dubbo-rpc-dubbo (apache#2797)

* Adding dependency on dubbo-remoting-mina so DubboProtocolTest.testDubboProtocolWithMina is no longer flaky

* Changing port number to ensure new server/client created for test

* modify dubbo version to 2.6.5

* fix typo of field (apache#2825)

* [Dubbo-2845] Fix OOM in UT testSelectByWeight (apache#2845) (apache#2846)

Fix OOM Exception generated during UT

* Fix UT failed on windows with FileNetworkerTest (apache#2848)

Fix FileNetworkerTest failure

* Update README.md

remove oschina vote

* fixed typo of variable (apache#2875)

fixed type of variable

* Remove unnessesary code  in RegistryDirectory#doList (apache#2861)

* remove unnessesary code

* remove unused import

* add some ScriptRoute test case (apache#2879)

* add router test case

* correct an error word

* remove the duplicate superclass of TagRouter and ConditionRouter (apache#2885)

Remove the class ConditionRouter and TagRouter implement duplicate superclass Comparable
CrazyHZM pushed a commit to CrazyHZM/dubbo that referenced this pull request Dec 6, 2018
* Refactor method isDelay of ServiceBean to fix the wrong meaning of the method

* Remove unnecessary method isDelay of ServiceBean
CrazyHZM added a commit to CrazyHZM/dubbo that referenced this pull request Dec 6, 2018
* combine test coverage report (apache#2643)

* Optimize ut for serialization model. (apache#2632)

* 1. Integrate the unit test of the serialization module, code reuse.
2. Remove redundant unit tests and pojo classes.
3. Remove the useless pojo class in the common module.

* fix ci fail

* fix ci fail

* fix ci fail

* fix ci fail

* remove author info

* prototype for issue2570 (apache#2640)

* apache#2570: dubbo all in one fail to start from a tomcat server when spring framework is absent

* add comments and fix unit test

* add license header

* update comments in unit tests

* [Dubbo -fix annotation bug] Fix @reference bug (apache#2649)

It's fine.

* Merge pull request apache#2656, make sure serialization exception sends back to consumer to preventing endless waiting.

Fixes apache#1903: Our customized serialization id exceeds the maximum limit, now it cannot work on 2.6.2 anymore.

*     apache#1903: supplemental change (apache#2666)

* Optimize the doSelect method of RandomLoadBalance to reduce the times of invoke of the getWeight method of the AbstractLoadBalance (apache#2597)

* 解决与quartz集成报错问题 (apache#2677)

quartz初始化的Bean没有beanName,beanName=null,走这段代码的时候报空指针了。
org.springframework.boot.autoconfigure.quartz.AutowireCapableBeanJobFactory类的createJobInstance方法中使用this.beanFactory.initializeBean(jobInstance, null);初始化的Bean,其beanName=null。

* Code format (apache#2662)

* NullPointerException

* code rule

* Merge pull request#2679, consumer throws RpcException when RegistryDirectory notify in high QPS.

Fixes apache#2016

* remove ServiceClassHolder and use the ApplicationModel replacedly (apache#2646)

* [Dubbo] move the classes of model from config to rpc-api for reusing

* remove ServiceClassHolder and use the ApplicationModel replacedly

* [Dubbo] delete the unused imported of ApplicationModel

* Update dubbo-demo-consumer.xml

this commits is no need to commit to remote repo.

* [Dubbo-1983] Support Protobuf Serialization (apache#2618)

* finish support protobuf

* polish

* fix code review

* use the general test for serialization

* Smooth Round Robin selection (apache#2650)

* enhance pull request 2618 (apache#2691)

* enhance pull request 2618

* move spi file into the right directory

* ignore protostuff test case

* make unit test pass, support Time type

* fix useless imports issue

* add license header

* fix typo error in FAQ (apache#2684)

fix typo error in FAQ

* remove author info for RoundRobinLoadBalance (apache#2697)

* fix pom for protostuff serialization (apache#2700)

* Optimize REGISTRIES field in AbstractRegistryFactory. (apache#2703)

* modify ConcurrentHashMap to HashMap.这里REGISTRIES在使用的时候都会先加锁,不存在多线程安全的问题。所以这里建议使用hashmap

* modify ConcurrentHashMap to HashMap.这里REGISTRIES在使用的时候都会先加锁,不存在多线程安全的问题。所以这里建议使用hashmap

* [version 2.7.0]remove the StaticContext class and refactor the code related to Async (apache#2688)

* [Dubbo] move the classes of model from config to rpc-api for reusing

* remove ServiceClassHolder and use the ApplicationModel replacedly

* [Dubbo] delete the unused imported of ApplicationModel

* Update dubbo-demo-consumer.xml

this commits is no need to commit to remote repo.

* remove StaticContext

* remove the unused imported classes of ReferenceConfig

* fix NPE of ConsumerModel

* fix the failed testcase of AbstractClusterInvokerTest

* [Dubbo] #PR2688 to fix the review issues

* Optimize heartbeat and reconnect task. (apache#2658)

* Optimize heartbeat and reconnect task.
1.Use hashedWheelTimer.
2.Distinguish between reconnect and heartbeat.
3.Increase inspection cycle.

* fix ci fail.

* fix ci fail.

* fix ci fail.

* polish the code for pull request 2658: Optimize heartbeat and reconnect task (apache#2709)

* 重构 ServiceBean 的 isDelay 方法,使其更符合语义 (apache#2686)

* Refactor method isDelay of ServiceBean to fix the wrong meaning of the method

* Remove unnecessary method isDelay of ServiceBean

* 【Unit Test】FailbackRegistry Test: recover method (apache#2591)

* FailbackRegistry Test: recover method

* fix the type error, and use CountDownLatch await method to fix the unstable problom

* trigger the travis ci test retry

* trigger the code static check again

* replace ServiceAnnotationBeanPostProcessor log.isInfoEnabled->log.isWarnEnabled (apache#2712)

simplify ExtensionLoader code segment

* [Dubbo-2678][For Master] Add ability to turn off SPI auto injection, special support for Object type.  (apache#2682)

* Add ability to turn off SPI auto injection, special support for generic Object type injection.

* Change Inject to AutoInject since it's main purpose is to turn off auto-injection.

* disable is redundant in DisableInject annotation

* Merge pull request apache#2725, problems of graceful shutdown in 2.6.3 and some recommendation.

* enhance comments (apache#2735)

* code format (apache#2730)

* NullPointerException

* code rule

* code rule

* Close all servers/ports after tests finish (apache#2741)

*  Simplify the code of StringUtils to make it more graceful. (apache#2740)

* Simplify the code of StringUtils to make it more graceful.

* Add Apache license

* Add 'forks' config into xml config (apache#2568)

* Add forks into xml config.

* Add forks into xml config.

* Add forks into xml config.

* fix typo (apache#2747)

* [DUBBO-2489] MockClusterInvoker provides local forced mock,I tested it locally, but it doesn't work (apache#2742)

*     apache#2748: Provider should disable mock configuration (apache#2749)

* Fix the bug that ReferenceBean refers service more than once when debugging. (apache#2754)

note:
please visit http://t.cn/EAhta27 for more detail.

* Close all servers/ports after tests finish (apache#2755)

* add checkstyle rule to check import order (apache#2745)

* Changing URL so tests can run in any order (apache#2760)

* [Dubbo-2353]fix Invalid property 'interfaceName' of bean class [org.apache.dubbo.config.spring.ServiceBean]apache#2353 (apache#2418)

* add getter and setter for ServiceConfig's interfaceName property#2353

* add interfaceName to ignoreAttributeNames and change the unit test

* delete the demo source code and update the unit test

* unchange ServiceConfig

* update unit test

* update unit test

*     apache#2762: [Dubbo - qos-http] stopServer should be invoked ? (apache#2767)

*     apache#2777: heartbeat threads blocks process shutdown (apache#2778)

Fix heartbeat threads blocks process shutdown because its hashed-wheel-timer is non-daemon thread.

* oschina vote (apache#2786)

* fix typo (apache#2791)

Fix typo confilict -> conflict

* improvement on Parameters and CollectionUtils (apache#2790)

Use CollectionUtils.toStringMap to reduce duplicate code in Parameters, and use Java 8 type inference for collections.

* [REFACTOR]:[fix typo] (apache#2804)

fix typos

* [Dubbo-2798]fix apporiate NotWritablePropertyException (apache#2800)

fix apache#2798 .
'propertyname in java donot contain '-' but camel format'.

* [Dubbo-2758] Adding dependency on dubbo-remoting-mina for tests in dubbo-rpc-dubbo (apache#2797)

* Adding dependency on dubbo-remoting-mina so DubboProtocolTest.testDubboProtocolWithMina is no longer flaky

* Changing port number to ensure new server/client created for test

* modify dubbo version to 2.6.5

* fix typo of field (apache#2825)

* [Dubbo-2845] Fix OOM in UT testSelectByWeight (apache#2845) (apache#2846)

Fix OOM Exception generated during UT

* Fix UT failed on windows with FileNetworkerTest (apache#2848)

Fix FileNetworkerTest failure

* Update README.md

remove oschina vote

* fixed typo of variable (apache#2875)

fixed type of variable

* Remove unnessesary code  in RegistryDirectory#doList (apache#2861)

* remove unnessesary code

* remove unused import

* add some ScriptRoute test case (apache#2879)

* add router test case

* correct an error word

* remove the duplicate superclass of TagRouter and ConditionRouter (apache#2885)

Remove the class ConditionRouter and TagRouter implement duplicate superclass Comparable
@LuckyDevin
Copy link

very much like

1 similar comment
@574258039
Copy link

very much like

@Alexbonbon
Copy link

看着真是别扭

@iupikachu
Copy link

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/waiting-for-feedback Need reporters to triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants