Skip to content

Commit

Permalink
Fix tautological condition in zero.go (#3516)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Jun 5, 2019
1 parent f97d6b5 commit 959e16c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dgraph/cmd/zero/zero.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,10 @@ func (s *Server) ShouldServe(
// serving.
return tab, nil
}
if tab == nil && tablet.ReadOnly {
// Read-only requests should return an empty tablet instead of asking zero to serve
// the predicate.

// Read-only requests should return an empty tablet instead of asking zero
// to serve the predicate.
if tablet.ReadOnly {
return &pb.Tablet{}, nil
}

Expand Down

0 comments on commit 959e16c

Please sign in to comment.