Skip to content

Commit

Permalink
Keep maxDelay during timestamp req to 1s.
Browse files Browse the repository at this point in the history
  • Loading branch information
manishrjain authored and dna2github committed Jul 19, 2019
1 parent a707304 commit 1ffba52
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions edgraph/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,15 @@ type Server struct{}
func (s *ServerState) fillTimestampRequests() {
const (
initDelay = 10 * time.Millisecond
maxDelay = 10 * time.Second
maxDelay = time.Second
)
delay := initDelay

var reqs []tsReq
for {
// Reset variables.
reqs = reqs[:0]
delay := initDelay

req := <-s.needTs
slurpLoop:
for {
Expand Down Expand Up @@ -236,7 +239,6 @@ func (s *ServerState) fillTimestampRequests() {
}
goto retry
}
delay = initDelay
var offset uint64
for _, req := range reqs {
if req.readOnly {
Expand All @@ -247,7 +249,6 @@ func (s *ServerState) fillTimestampRequests() {
}
}
x.AssertTrue(ts.StartId == 0 || ts.StartId+offset-1 == ts.EndId)
reqs = reqs[:0]
}
}

Expand Down

0 comments on commit 1ffba52

Please sign in to comment.