dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] feelwing1314 opened a new issue #1728: System property dubbo.service.delay invalid
Date Thu, 03 May 2018 06:53:31 GMT
feelwing1314 opened a new issue #1728: System property dubbo.service.delay invalid
URL: https://github.com/apache/incubator-dubbo/issues/1728
 
 
   根据dubbo参数的映射关系<dubbo:service delay="5000">也可以通过-Ddubbo.service.delay=5000配置,但是发现-Ddubbo.service.delay=5000不起作用;
   
   debug下面这段代码(ServiceConfig.java)发现:
   public synchronized void export() {
       ... ...
       if (delay != null && delay > 0) {
           delayExportExecutor.schedule(new Runnable() {
               @Override
               public void run() {
                   doExport();
               }
           }, delay, TimeUnit.MILLISECONDS);
       } else {
           doExport();
       }
   }
   如果有deplay,先delay再doExport(),而解析JVM参数的逻辑(appendProperties(this);)是在doExport()方法中调用;所以导致
if (delay != null && delay > 0)判断时,还没有解析JVM参数-Ddubbo.service.delay=5000,从而导致这种配置不起作用;

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message