Skip to content

Commit 1f47e80

Browse files
committed
Require src & dst connstrs, default localhost for meta, tweak verbiage.
This helps ensure proper usage of the tool. Defaulting the meta DB to localhost simplifies setting up multiple concurrent verifiers.
1 parent 6e306f4 commit 1f47e80

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

main/migration_verifier.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,24 @@ func main() {
7676
Usage: "path to an optional YAML config file",
7777
}),
7878
altsrc.NewStringFlag(cli.StringFlag{
79-
Name: srcURI,
80-
Value: "mongodb://localhost:27017",
81-
Usage: "source Host `URI` for migration verification",
79+
Name: srcURI,
80+
Usage: "source connection string",
81+
Required: true,
8282
}),
8383
altsrc.NewStringFlag(cli.StringFlag{
84-
Name: dstURI,
85-
Value: "mongodb://localhost:27018",
86-
Usage: "destination Host `URI` for migration verification",
84+
Name: dstURI,
85+
Usage: "destination connection string",
86+
Required: true,
8787
}),
8888
altsrc.NewStringFlag(cli.StringFlag{
8989
Name: metaURI,
90-
Value: "mongodb://localhost:27019",
91-
Usage: "host `URI` for storing migration verification metadata",
90+
Value: "mongodb://localhost",
91+
Usage: "connection string to replset that stores verifier metadata",
9292
}),
9393
altsrc.NewIntFlag(cli.IntFlag{
9494
Name: serverPort,
9595
Value: 27020,
96-
Usage: "`port` for the control web server",
96+
Usage: "`port` for the control web server (0 assigns a random port)",
9797
}),
9898
altsrc.NewStringFlag(cli.StringFlag{
9999
Name: logPath,
@@ -103,7 +103,7 @@ func main() {
103103
altsrc.NewIntFlag(cli.IntFlag{
104104
Name: numWorkers,
105105
Value: 10,
106-
Usage: "`number` of worker threads to use for verification",
106+
Usage: "number of worker threads to use for verification",
107107
}),
108108
altsrc.NewInt64Flag(cli.Int64Flag{
109109
Name: generationPauseDelay,
@@ -115,6 +115,10 @@ func main() {
115115
Value: 1_000,
116116
Usage: "`milliseconds` workers sleep while waiting for work",
117117
}),
118+
altsrc.NewBoolFlag(cli.BoolFlag{
119+
Name: verifyAll,
120+
Usage: "Verify all user namespaces",
121+
}),
118122
altsrc.NewStringSliceFlag(cli.StringSliceFlag{
119123
Name: srcNamespace,
120124
Usage: "source `namespaces` to check",
@@ -141,10 +145,6 @@ func main() {
141145
),
142146
Value: string(verifier.DocCompareDefault),
143147
}),
144-
altsrc.NewBoolFlag(cli.BoolFlag{
145-
Name: verifyAll,
146-
Usage: "If set, verify all user namespaces",
147-
}),
148148
altsrc.NewBoolFlag(cli.BoolFlag{
149149
Name: startClean,
150150
Usage: "If set, drop all previous verification metadata before starting",

0 commit comments

Comments
 (0)