Skip to content

Commit d6fefe5

Browse files
committed
fix dump versiondb changeset cmd
1 parent 5622ae2 commit d6fefe5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

versiondb/client/dump.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,12 @@ func DumpVersionDBChangeSetCmd(defaultStores []string) *cobra.Command {
367367
return err
368368
}
369369

370-
for _, storeKey := range defaultStores {
370+
stores, err := GetStoresOrDefault(cmd, defaultStores)
371+
if err != nil {
372+
return err
373+
}
374+
375+
for _, storeKey := range stores {
371376
for version := startVersion; version < endVersion; version++ {
372377
it, err := versionDB.IteratorAtVersion(storeKey, nil, nil, &version)
373378
if err != nil {
@@ -416,5 +421,8 @@ func DumpVersionDBChangeSetCmd(defaultStores []string) *cobra.Command {
416421
return nil
417422
},
418423
}
424+
cmd.Flags().Int64(flagStartVersion, 0, "The start version")
425+
cmd.Flags().Int64(flagEndVersion, 0, "The end version, exclusive, default to latestVersion+1")
426+
cmd.Flags().String(flagStores, "", "list of store names, default to the current store list in application")
419427
return cmd
420428
}

0 commit comments

Comments
 (0)