()
| 203 | } |
| 204 | |
| 205 | func (ctx *context) maxSyncActionIndex() (maxIndex int) { |
| 206 | for _, g := range ctx.group { |
| 207 | for _, x := range g.Servers { |
| 208 | if x.Action.State == models.ActionPending { |
| 209 | maxIndex = math2.MaxInt(maxIndex, x.Action.Index) |
| 210 | } |
| 211 | } |
| 212 | } |
| 213 | return maxIndex |
| 214 | } |
| 215 | |
| 216 | func (ctx *context) minSyncActionIndex() string { |
| 217 | var d *models.GroupServer |