diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2020-06-03 18:07:43 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2020-06-09 11:35:46 +0300 |
commit | be8297265d90def3b9683a3013c99d8e7eb75d17 (patch) | |
tree | 52e026d621a04a37860387f1f0a17dca728d96b4 /internal/praefect/protoregistry | |
parent | a10ef72068e224255018b9a84298156b3d42aa20 (diff) |
Praefect: unhealthy nodes must not be used for read distribution
Coordinator must take into account state of the secondary node
that is considered for forwarding a read operation onto.
Unhealthy node must not be chosen even if it is in up to date
state in terms of replication.
Each node contains N last health checks that are used to verify
if node is healthy. It has been moved from `nodeCandidate`.
And `localElector` now does health check for it's nodes in
parallel.
Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2823
Diffstat (limited to 'internal/praefect/protoregistry')
-rw-r--r-- | internal/praefect/protoregistry/protoregistry.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/praefect/protoregistry/protoregistry.go b/internal/praefect/protoregistry/protoregistry.go index f7ebe6f7e..cabc38b19 100644 --- a/internal/praefect/protoregistry/protoregistry.go +++ b/internal/praefect/protoregistry/protoregistry.go @@ -46,7 +46,7 @@ type OpType int const ( // OpUnknown = unknown operation type - OpUnknown = iota + OpUnknown OpType = iota // OpAccessor = accessor operation type (ready only) OpAccessor // OpMutator = mutator operation type (modifies a repository) @@ -60,7 +60,7 @@ const ( // ScopeUnknown is the default scope until determined otherwise ScopeUnknown = iota // ScopeRepository indicates an RPC's scope is limited to a repository - ScopeRepository = iota + ScopeRepository Scope = iota // ScopeStorage indicates an RPC is scoped to an entire storage location ScopeStorage // ScopeServer indicates an RPC is scoped to an entire server |