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

修改Redis在宕机情况下CPU占用高的bug #4

Merged
merged 2 commits into from
Feb 26, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,11 @@
<xsd:documentation><![CDATA[ The method name (method.toString()). ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="executes" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[ The max active requests. ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="stat" type="xsd:string" use="optional" default="-1">
<xsd:annotation>
<xsd:documentation><![CDATA[ The method parameter index for statistics. ]]></xsd:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down