diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-01-29 20:01:03 +0300 |
---|---|---|
committer | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-01-29 20:01:03 +0300 |
commit | 8db97acb3126deb70db27d2405d9f5c482f48c5c (patch) | |
tree | 0c0ae3b412e24ce502c47175867bb0c6cb1c578f | |
parent | 8537c30b8f36fb6dac6bbdc549169d7dc0eb5a98 (diff) | |
parent | bc902a1c86b85bd3ae2dcea733b4402ca1a81ea6 (diff) |
Merge branch 'ruby-restart-overlap' into 'master'
Wait between ruby worker removal from pool and graceful shutdown
Closes #971
See merge request gitlab-org/gitaly!567
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | internal/rubyserver/worker.go | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e4a097d4..4ffb65999 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ UNRELEASED +- Wait between ruby worker removal from pool and graceful shutdown + https://gitlab.com/gitlab-org/gitaly/merge_requests/567 - Register the ServerService https://gitlab.com/gitlab-org/gitaly/merge_requests/572 - Vendor gitlab_git at f8dd398a21b19cb7d56 diff --git a/internal/rubyserver/worker.go b/internal/rubyserver/worker.go index 79f80334b..41de27a6d 100644 --- a/internal/rubyserver/worker.go +++ b/internal/rubyserver/worker.go @@ -137,6 +137,10 @@ func (w *worker) monitor() { } func (w *worker) waitTerminate(pid int) { + // Wait for in-flight requests to reach the worker before we slam the + // door in their face. + time.Sleep(1 * time.Minute) + terminationCounter.WithLabelValues(w.Name).Inc() log.WithFields(log.Fields{ |