Skip to content

Commit 15c16a1

Browse files
committed
chore: remove multi node cluster flag
1 parent ed952dc commit 15c16a1

File tree

4 files changed

+0
-18
lines changed

4 files changed

+0
-18
lines changed

cmd/signozschemamigrator/migrate.go

-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ func main() {
3737

3838
f.String("dsn", "", "Clickhouse DSN")
3939
f.String("cluster-name", "cluster", "Cluster name to use while running migrations")
40-
f.Bool("multi-node-cluster", false, "True if the dsn points to a multi node clickhouse cluster, false otherwise. Defaults to false.")
4140
f.Bool("disable-duration-sort-feature", false, "Flag to disable the duration sort feature. Defaults to false.")
4241
f.Bool("disable-timestamp-sort-feature", false, "Flag to disable the timestamp sort feature. Defaults to false.")
4342

@@ -56,11 +55,6 @@ func main() {
5655
logger.Fatal("Failed to get cluster name from args", zap.Error(err))
5756
}
5857

59-
multiNodeCluster, err := f.GetBool("multi-node-cluster")
60-
if err != nil {
61-
logger.Fatal("Failed to get multi node cluster flag from args", zap.Error(err))
62-
}
63-
6458
disableDurationSortFeature, err := f.GetBool("disable-duration-sort-feature")
6559
if err != nil {
6660
logger.Fatal("Failed to get disable duration sort feature flag from args", zap.Error(err))
@@ -82,7 +76,6 @@ func main() {
8276
managerConfig := migrationmanager.NewConfig(
8377
dsn,
8478
clusterName,
85-
multiNodeCluster,
8679
disableDurationSortFeature,
8780
disableTimestampSortFeature,
8881
)

migrationManager/manager.go

-2
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ type Config struct {
2424
func NewConfig(
2525
dsn string,
2626
clusterName string,
27-
isMultiNodeCluster bool,
2827
isDurationSortFeatureDisabled bool,
2928
isTimestampSortFeatureDisabled bool,
3029
) Config {
3130
return Config{
3231
MigratorConfig: migrators.MigratorConfig{
3332
DSN: dsn,
3433
ClusterName: clusterName,
35-
IsMultiNodeCluster: isMultiNodeCluster,
3634
IsDurationSortFeatureDisabled: isDurationSortFeatureDisabled,
3735
IsTimestampSortFeatureDisabled: isTimestampSortFeatureDisabled,
3836
},

migrationManager/migrators/baseMigrator/migrator.go

-8
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ func (m *BaseMigrator) Migrate(ctx context.Context, database string, migrationFo
4141
return err
4242
}
4343

44-
// drop schema migrations table if running in docker multi node cluster mode so that migrations are run on new nodes
45-
if m.Cfg.IsMultiNodeCluster {
46-
err := m.dropSchemaMigrationsTable(ctx, database)
47-
if err != nil {
48-
return err
49-
}
50-
}
51-
5244
return m.runSqlMigrations(ctx, migrationFolder, database)
5345
}
5446

migrationManager/migrators/migrators.go

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
type MigratorConfig struct {
1010
DSN string
1111
ClusterName string
12-
IsMultiNodeCluster bool
1312
IsDurationSortFeatureDisabled bool
1413
IsTimestampSortFeatureDisabled bool
1514
}

0 commit comments

Comments
 (0)