kylixs commented on issue #8985: URL: https://github.com/apache/dubbo/issues/8985#issuecomment-942943406
Some work is done in https://github.com/apache/dubbo/pull/9033, pls check it. 1. The application destroy processing is changed: https://github.com/apache/dubbo/pull/9033#discussion_r728613024 2. prevent refresh metadata in application stopping. ```java if (registered) { // scheduled task for updating Metadata and ServiceInstance asyncMetadataFuture = executorRepository.getSharedScheduledExecutor().scheduleAtFixedRate(() -> { // ignore refresh metadata on stopping ApplicationDeployer deployer = applicationModel.getDeployer(); if (deployer != null && (deployer.isStopping() || deployer.isStopped())) { return; } InMemoryWritableMetadataService localMetadataService = (InMemoryWritableMetadataService) WritableMetadataService.getDefaultExtension(applicationModel); localMetadataService.blockUntilUpdated(); try { ServiceInstanceMetadataUtils.refreshMetadataAndInstance(serviceInstance); } catch (Exception e) { logger.error("Refresh instance and metadata error", e); } finally { localMetadataService.releaseBlock(); } }, 0, ConfigurationUtils.get(applicationModel, METADATA_PUBLISH_DELAY_KEY, DEFAULT_METADATA_PUBLISH_DELAY), TimeUnit.MILLISECONDS); } ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
