(tablet *pb.Tablet)
| 458 | } |
| 459 | |
| 460 | func (g *groupi) sendTablet(tablet *pb.Tablet) (*pb.Tablet, error) { |
| 461 | pl := g.connToZeroLeader() |
| 462 | zc := pb.NewZeroClient(pl.Get()) |
| 463 | |
| 464 | out, err := zc.ShouldServe(g.Ctx(), tablet) |
| 465 | if err != nil { |
| 466 | glog.Errorf("Error while ShouldServe grpc call %v", err) |
| 467 | return nil, err |
| 468 | } |
| 469 | |
| 470 | // Do not store tablets with group ID 0, as they are just dummy tablets for |
| 471 | // predicates that do no exist. |
| 472 | if out.GroupId > 0 { |
| 473 | g.Lock() |
| 474 | g.tablets[out.GetPredicate()] = out |
| 475 | g.Unlock() |
| 476 | } |
| 477 | |
| 478 | if out.GroupId == groups().groupId() { |
| 479 | glog.Infof("Serving tablet for: %v\n", tablet.GetPredicate()) |
| 480 | } |
| 481 | return out, nil |
| 482 | } |
| 483 | |
| 484 | func (g *groupi) Inform(preds []string) ([]*pb.Tablet, error) { |
| 485 | unknownPreds := make([]*pb.Tablet, 0) |
no test coverage detected