ServingTablet returns the Tablet called tablet.
(tablet string)
| 307 | |
| 308 | // ServingTablet returns the Tablet called tablet. |
| 309 | func (s *Server) ServingTablet(tablet string) *pb.Tablet { |
| 310 | s.RLock() |
| 311 | defer s.RUnlock() |
| 312 | |
| 313 | for _, group := range s.state.Groups { |
| 314 | if tab, ok := group.Tablets[tablet]; ok { |
| 315 | return tab |
| 316 | } |
| 317 | } |
| 318 | return nil |
| 319 | } |
| 320 | |
| 321 | func (s *Server) blockTablet(pred string) func() { |
| 322 | s.blockCommitsOn.Store(pred, struct{}{}) |
no test coverage detected