Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/praefect')
-rw-r--r--internal/praefect/assignment.go2
-rw-r--r--internal/praefect/coordinator.go4
-rw-r--r--internal/praefect/nodes/per_repository.go2
-rw-r--r--internal/praefect/reconciler/reconciler_test.go8
-rw-r--r--internal/praefect/replicator_test.go2
-rw-r--r--internal/praefect/repocleaner/repository_test.go4
-rw-r--r--internal/praefect/server.go2
7 files changed, 12 insertions, 12 deletions
diff --git a/internal/praefect/assignment.go b/internal/praefect/assignment.go
index 1aa6447ad..c2c9b19c0 100644
--- a/internal/praefect/assignment.go
+++ b/internal/praefect/assignment.go
@@ -22,7 +22,7 @@ func NewDisabledAssignmentStore(storages map[string][]string) AssignmentStore {
return disabledAssignments(storages)
}
-// GetHostAssigments simply returns all of the storages configured for the virtual storage.
+// GetHostAssignments simply returns all of the storages configured for the virtual storage.
func (storages disabledAssignments) GetHostAssignments(ctx context.Context, virtualStorage string, repositoryID int64) ([]string, error) {
return storages[virtualStorage], nil
}
diff --git a/internal/praefect/coordinator.go b/internal/praefect/coordinator.go
index 7ada12e4a..03f9e0df2 100644
--- a/internal/praefect/coordinator.go
+++ b/internal/praefect/coordinator.go
@@ -618,7 +618,7 @@ func streamParametersContext(ctx context.Context) context.Context {
// world view of which features are enabled and which ones aren't and ideally do the same
// thing.
//
- // This problem isn't solveable on Gitaly side, but Praefect is in a perfect position to do
+ // This problem isn't solvable on Gitaly side, but Praefect is in a perfect position to do
// so. While it may have the same problem in a load-balanced multi-Praefect setup, this is
// much less of a problem: the most important thing is that the view on feature flags is
// consistent for a single RPC call, and that will always be the case regardless of which
@@ -1141,7 +1141,7 @@ func (c *Coordinator) newRequestFinalizer(
}
// The cancellation signal is suppressed earlier in the function, so we'd return no error if the
- // orignal context exceeded its deadline while running the request finalizer. If there were
+ // original context exceeded its deadline while running the request finalizer. If there were
// no other errors, return the possible error from the context so we don't return OK code for
// failed requests.
return originalCtx.Err()
diff --git a/internal/praefect/nodes/per_repository.go b/internal/praefect/nodes/per_repository.go
index 0b1682f73..a07946303 100644
--- a/internal/praefect/nodes/per_repository.go
+++ b/internal/praefect/nodes/per_repository.go
@@ -50,7 +50,7 @@ func (pr *PerRepositoryElector) GetPrimary(ctx context.Context, virtualStorage s
// 1. `election`, as this indicates this transaction re-elected the primary and the CTE now contains the most
// recent change
// 2. `reread`, as this indicates a concurrent transaction had potentially changed the primary.
- // 3. `snapshot`, if the current primary was valid in the transcation's database snapshot.
+ // 3. `snapshot`, if the current primary was valid in the transaction's database snapshot.
var current, previous sql.NullString
if err := pr.db.QueryRowContext(ctx, `
WITH reread AS (
diff --git a/internal/praefect/reconciler/reconciler_test.go b/internal/praefect/reconciler/reconciler_test.go
index 230447d88..10b06b709 100644
--- a/internal/praefect/reconciler/reconciler_test.go
+++ b/internal/praefect/reconciler/reconciler_test.go
@@ -1055,16 +1055,16 @@ func TestReconciler(t *testing.T) {
t.Helper()
runCtx, cancelRun := context.WithCancel(ctx)
- var stopped, resetted bool
+ var stopped, reset bool
ticker := helper.NewManualTicker()
ticker.StopFunc = func() { stopped = true }
ticker.ResetFunc = func() {
- if resetted {
+ if reset {
cancelRun()
return
}
- resetted = true
+ reset = true
ticker.Tick()
}
@@ -1079,7 +1079,7 @@ func TestReconciler(t *testing.T) {
require.Equal(t, context.Canceled, reconciler.Run(runCtx, ticker))
require.True(t, stopped)
- require.True(t, resetted)
+ require.True(t, reset)
}
for vs, repos := range tc.deletedRepositories {
diff --git a/internal/praefect/replicator_test.go b/internal/praefect/replicator_test.go
index 68ba3f314..c81341012 100644
--- a/internal/praefect/replicator_test.go
+++ b/internal/praefect/replicator_test.go
@@ -847,7 +847,7 @@ func TestProcessBacklog_ReplicatesToReadOnlyPrimary(t *testing.T) {
ctx, cancel := context.WithCancel(testhelper.Context(t))
defer cancel()
- const virtualStorage = "virtal-storage"
+ const virtualStorage = "virtual-storage"
const primaryStorage = "storage-1"
const secondaryStorage = "storage-2"
const repositoryID = 1
diff --git a/internal/praefect/repocleaner/repository_test.go b/internal/praefect/repocleaner/repository_test.go
index 94501ea6c..3d45a27c3 100644
--- a/internal/praefect/repocleaner/repository_test.go
+++ b/internal/praefect/repocleaner/repository_test.go
@@ -163,13 +163,13 @@ func TestRunner_Run(t *testing.T) {
var iteration int32
runner := NewRunner(cfg, logger, praefect.StaticHealthChecker{virtualStorage: []string{storage1, storage2, storage3}}, nodeSet.Connections(), storageCleanup, storageCleanup, actionStub{
- PerformMethod: func(ctx context.Context, argVirtualStoage, argStorage string, notExisting []string) error {
+ PerformMethod: func(ctx context.Context, argVirtualStorage, argStorage string, notExisting []string) error {
// There should be three iterations, as each storage has
// one repository that is unused by praefect.
atomic.AddInt32(&iteration, 1)
i := atomic.LoadInt32(&iteration)
- assert.Equal(t, virtualStorage, argVirtualStoage)
+ assert.Equal(t, virtualStorage, argVirtualStorage)
assert.Equal(t, []string{"repo-4.git"}, notExisting)
if i == 3 {
diff --git a/internal/praefect/server.go b/internal/praefect/server.go
index c52b160f5..af4c74f0f 100644
--- a/internal/praefect/server.go
+++ b/internal/praefect/server.go
@@ -105,7 +105,7 @@ func WithStreamInterceptor(interceptor grpc.StreamServerInterceptor) ServerOptio
}
}
-// NewGRPCServer returns gRPC server wuth registered proxy-handler and actual services praefect serves on its own.
+// NewGRPCServer returns gRPC server with registered proxy-handler and actual services praefect serves on its own.
// It includes a set of unary and stream interceptors required to add logging, authentication, etc.
func NewGRPCServer(
deps *Dependencies,