MCPcopy
hub / github.com/dgraph-io/dgraph / ServingTablet

Method ServingTablet

dgraph/cmd/zero/zero.go:309–319  ·  view source on GitHub ↗

ServingTablet returns the Tablet called tablet.

(tablet string)

Source from the content-addressed store, hash-verified

307
308// ServingTablet returns the Tablet called tablet.
309func (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
321func (s *Server) blockTablet(pred string) func() {
322 s.blockCommitsOn.Store(pred, struct{}{})

Callers 5

InformMethod · 0.95
ShouldServeMethod · 0.95
commitMethod · 0.95
MoveTabletMethod · 0.95
movePredicateMethod · 0.95

Calls 2

RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by

no test coverage detected