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

Dubbo 2.7.1 : delay export function doesn't work... #3952

Closed
spiritme1984 opened this issue Apr 29, 2019 · 2 comments
Closed

Dubbo 2.7.1 : delay export function doesn't work... #3952

spiritme1984 opened this issue Apr 29, 2019 · 2 comments
Labels
type/bug Bugs to being fixed
Milestone

Comments

@spiritme1984
Copy link

spiritme1984 commented Apr 29, 2019

I set 'delay' label in dubbo config file as below:

  <dubbo:provider timeout="${dubbo.timeout}" retries="${dubbo.retry}" accesslog="${dubbo.accesslog}" delay="30000" filter="dubboSofaTracrFilter"/> 

But when I start the project come across an error:

2019-04-29 17:12:21.525 [crm7] [ERROR] [,] [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:331) Context initialization failed
java.lang.NullPointerException
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:335)
	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:319)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:113)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:59)
        ....

And I debug the code and found in ServiceConfig.java, there is a method named 'export':

    public synchronized void export() {
        checkAndUpdateSubConfigs();
        if (!shouldExport()) {
            return;
        }
        if (shouldDelay()) {
            delayExportExecutor.schedule(this::doExport, delay, TimeUnit.MILLISECONDS);
        } else {
            doExport();
        }
    }

In this method the 'delay' param is null , and I can't found codes where set value for it.
Please correct me if I was wrong, thank you.

@Leishunyu
Copy link
Contributor

I have fixed it in this pr
#3957

@ralf0131 ralf0131 added this to the 2.7.2 milestone Apr 30, 2019
@ralf0131 ralf0131 added the type/bug Bugs to being fixed label Apr 30, 2019
@ralf0131
Copy link
Contributor

This bug has been fixed from 2.7.2 onwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

3 participants