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 committed Nov 15, 2018
1 parent d05e933 commit 4a87eca
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 4a87eca

Please sign in to comment.