From 6ebd62462cfa5980739e68c7c4790f163f16e11d Mon Sep 17 00:00:00 2001 From: JoeCao Date: Tue, 26 Feb 2013 17:42:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9Redis=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=AE=95=E6=9C=BA=E6=97=B6=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=8D=A0=E7=94=A8cpu=E9=AB=98=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/alibaba/dubbo/registry/redis/RedisRegistry.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java b/dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java index efa9c33e35b..b754d953305 100644 --- a/dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java +++ b/dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java @@ -604,6 +604,8 @@ public void run() { } } catch (Throwable t) { // 重试另一台 logger.warn("Failed to subscribe service from redis registry. registry: " + entry.getKey() + ", cause: " + t.getMessage(), t); + // 如果在单台redis的情况下,需要休息一会,避免空转占用过多cpu资源 + sleep(reconnectPeriod); } } } catch (Throwable t) { From 935fe309267dab0b555d7308263f59fe88222434 Mon Sep 17 00:00:00 2001 From: JoeCao Date: Tue, 26 Feb 2013 20:53:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3method=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AEexecutes=E5=8F=82=E6=95=B0=E7=9A=84xsd=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/META-INF/dubbo.xsd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd index 94809fd480f..65df01c96ff 100644 --- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd +++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd @@ -589,6 +589,11 @@ + + + + +