Skip to content

Commit

Permalink
unstable->3.5 (OpenAtomFoundation#2396)
Browse files Browse the repository at this point in the history
* fix: codis-dashboard uses 100% cpu(OpenAtomFoundation#2332) (OpenAtomFoundation#2393)

Co-authored-by: liuchengyu <[email protected]>

* fix: The role displayed on the first Server in the Group area of the codis-fe is incorrect (OpenAtomFoundation#2350) (OpenAtomFoundation#2387)

Co-authored-by: liuchengyu <[email protected]>

---------

Co-authored-by: Chengyu Liu <[email protected]>
Co-authored-by: liuchengyu <[email protected]>
  • Loading branch information
3 people authored Feb 7, 2024
1 parent e86d3cd commit a19ea16
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion codis/cmd/fe/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,10 @@ <h4 style="padding-left:30px; padding-right:20px; display: inline;">Group</h4>
</span>
</td>
<td>
<a ng-href="http://[[codis_addr]]/api/topom/group/info/[[server.server]]" target="_blank" class="btn btn-default btn-xs active" role="button">S</a>
<span ng-switch="$index">
<a ng-switch-when="0" ng-href="http://[[codis_addr]]/api/topom/group/info/[[server.server]]" target="_blank" class="btn btn-default btn-xs active" role="button">Master</a>
<a ng-switch-default ng-href="http://[[codis_addr]]/api/topom/group/info/[[server.server]]" target="_blank" class="btn btn-default btn-xs active" role="button">Slave</a>
</span>
<span ng-switch="server.ha_status">
<span ng-switch-when="ha_master" style="color: darkgreen"
data-toggle="tooltip" data-placement="right" title="HA: MASTER">
Expand Down
8 changes: 7 additions & 1 deletion codis/pkg/proxy/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ func init() {
// Clear the accumulated maximum delay to 0
go func() {
for {
time.Sleep(time.Duration(RefreshPeriod.Int64()))
refreshPeriod := RefreshPeriod.Int64()
if refreshPeriod == 0 {
time.Sleep(15 * time.Second)
} else {
time.Sleep(time.Duration(refreshPeriod))
}

for _, s := range cmdstats.opmap {
s.maxDelay.Set(0)
}
Expand Down

0 comments on commit a19ea16

Please sign in to comment.