()
| 1395 | } |
| 1396 | |
| 1397 | func (q *querier) updateAll() { |
| 1398 | q.mu.Lock() |
| 1399 | defer q.mu.Unlock() |
| 1400 | |
| 1401 | for _, mpr := range q.mappers { |
| 1402 | // send on goroutine to avoid holding the q.mu. Heartbeat failures come asynchronously with respect to |
| 1403 | // other kinds of work, so it's fine to deliver the command to refresh async. |
| 1404 | go func(m *mapper) { |
| 1405 | // make sure we send on the _mapper_ context, not our own in case the mapper is |
| 1406 | // shutting down or shut down. |
| 1407 | _ = agpl.SendCtx(m.ctx, m.update, struct{}{}) |
| 1408 | }(mpr) |
| 1409 | } |
| 1410 | } |
| 1411 | |
| 1412 | // unhealthyCloseAll marks the coordinator unhealthy and closes all connections. We do this so that peers |
| 1413 | // are forced to reconnect to the coordinator, and will hopefully land on a healthy coordinator. |
no test coverage detected