Skip to content

Commit

Permalink
gemini: makes sure the result is updated on termination
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Johansson committed Jul 18, 2019
1 parent 4040728 commit 3fe8844
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

# Unreleased

- Bugfix that makes sure that when a job terminates early, the result status is
properly sent to the collector.

# 1.4.2

- Reused primary keys does no longer block the caller if none are available.
Expand Down
3 changes: 3 additions & 0 deletions cmd/gemini/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func MutationJob(ctx context.Context, pump <-chan heartBeat, wg *sync.WaitGroup,
testStatus = Status{}
}
if failFast && (testStatus.ReadErrors > 0 || testStatus.WriteErrors > 0) {
c <- testStatus
break
}
i++
Expand All @@ -57,6 +58,7 @@ func ValidationJob(ctx context.Context, pump <-chan heartBeat, wg *sync.WaitGrou
testStatus = Status{}
}
if failFast && (testStatus.ReadErrors > 0 || testStatus.WriteErrors > 0) {
c <- testStatus
break
}
i++
Expand All @@ -76,6 +78,7 @@ func WarmupJob(ctx context.Context, pump <-chan heartBeat, wg *sync.WaitGroup, s
case _, ok := <-pump:
if !ok {
logger.Info("warmup job terminated")
c <- testStatus
return
}
}
Expand Down

0 comments on commit 3fe8844

Please sign in to comment.