diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2021-10-15 11:59:04 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2021-10-15 11:59:04 +0300 |
commit | a27584d74cf557aca5b659066560f02bfe4d5f32 (patch) | |
tree | 1f2d5ff7bfbd6fe16d9c14e3bf223bb9a8ab9594 /cmd | |
parent | c17a7805ed53d8ce11e024047142733a71f6fa7d (diff) |
Revert "Get host assignment by repository ID"
This reverts commit 311fbb9789c5310314c8a2c6916bfb331aa4661b.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/praefect/main.go | 2 | ||||
-rw-r--r-- | cmd/praefect/subcmd_track_repository_test.go | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/cmd/praefect/main.go b/cmd/praefect/main.go index 5c90cc7b4..cf5225311 100644 --- a/cmd/praefect/main.go +++ b/cmd/praefect/main.go @@ -291,7 +291,7 @@ func run(cfgs []starter.Config, conf config.Config, b bootstrap.Listener, promre transactionManager := transactions.NewManager(conf) sidechannelRegistry := sidechannel.NewRegistry() clientHandshaker := backchannel.NewClientHandshaker(logger, praefect.NewBackchannelServerFactory(logger, transaction.NewServer(transactionManager), sidechannelRegistry)) - assignmentStore := praefect.NewDisabledAssignmentStore(conf.StorageNames()[conf.VirtualStorages[0].Name]) + assignmentStore := praefect.NewDisabledAssignmentStore(conf.StorageNames()) var ( nodeManager nodes.Manager healthChecker praefect.HealthChecker diff --git a/cmd/praefect/subcmd_track_repository_test.go b/cmd/praefect/subcmd_track_repository_test.go index 13504b07c..4f03576ed 100644 --- a/cmd/praefect/subcmd_track_repository_test.go +++ b/cmd/praefect/subcmd_track_repository_test.go @@ -182,10 +182,7 @@ func TestAddRepository_Exec(t *testing.T) { require.NoError(t, addRepoCmd.Exec(flag.NewFlagSet("", flag.PanicOnError), addCmdConf)) as := datastore.NewAssignmentStore(db, conf.StorageNames()) - repositoryID, err := repoDS.GetRepositoryID(ctx, virtualStorageName, relativePath) - require.NoError(t, err) - - assignments, err := as.GetHostAssignments(ctx, repositoryID) + assignments, err := as.GetHostAssignments(ctx, virtualStorageName, relativePath) require.NoError(t, err) require.Len(t, assignments, 2) assert.Contains(t, assignments, g1Cfg.Storages[0].Name) |