This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0-multi-instances
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0-multi-instances by this
push:
new a00be5a Compatible with 2.6 Registry
a00be5a is described below
commit a00be5a0f98d3de0eab66a37c7db4edecd47f487
Author: Albumen Kevin <[email protected]>
AuthorDate: Mon Aug 30 17:44:42 2021 +0800
Compatible with 2.6 Registry
---
.../org/apache/dubbo/registry/support/CacheableFailbackRegistry.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/CacheableFailbackRegistry.java
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/CacheableFailbackRegistry.java
index 2ef4e5c..e8ce4f4 100644
---
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/CacheableFailbackRegistry.java
+++
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/CacheableFailbackRegistry.java
@@ -32,6 +32,7 @@ import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.common.utils.UrlUtils;
import org.apache.dubbo.registry.NotifyListener;
import org.apache.dubbo.rpc.model.ScopeModel;
+import org.apache.dubbo.rpc.model.ScopeModelUtil;
import java.util.ArrayList;
import java.util.Collection;
@@ -82,7 +83,7 @@ public abstract class CacheableFailbackRegistry extends
FailbackRegistry {
extraParameters = new HashMap<>(8);
extraParameters.put(CHECK_KEY, String.valueOf(false));
- cacheRemovalScheduler =
url.getScopeModel().getExtensionLoader(ExecutorRepository.class).getDefaultExtension().nextScheduledExecutor();
+ cacheRemovalScheduler =
ScopeModelUtil.getApplicationModel(url.getScopeModel()).getExtensionLoader(ExecutorRepository.class).getDefaultExtension().nextScheduledExecutor();
cacheRemovalTaskIntervalInMillis = getIntConfig(url.getScopeModel(),
CACHE_CLEAR_TASK_INTERVAL, 2 * 60 * 1000);
cacheClearWaitingThresholdInMillis = getIntConfig(url.getScopeModel(),
CACHE_CLEAR_WAITING_THRESHOLD, 5 * 60 * 1000);
}