You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 13, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: cmd/tsdb/main.go
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,8 @@ func main() {
46
46
benchSamplesFile=benchWriteCmd.Arg("file", "input file with samples data, default is (../../testdata/20k.series)").Default("../../testdata/20k.series").String()
47
47
listCmd=cli.Command("ls", "list db blocks")
48
48
listPath=listCmd.Arg("db path", "database path (default is benchout/storage)").Default("benchout/storage").String()
49
+
scanCmd=cli.Command("scan", "scans the db and lists corrupted blocks")
50
+
scanPath=scanCmd.Arg("dir", "database path (default is current dir ./)").Default("./").String()
49
51
)
50
52
51
53
switchkingpin.MustParse(cli.Parse(os.Args[1:])) {
@@ -62,6 +64,12 @@ func main() {
62
64
exitWithError(err)
63
65
}
64
66
printBlocks(db.Blocks())
67
+
casescanCmd.FullCommand():
68
+
corrupted, err:=tsdb.Scan(*scanPath)
69
+
iferr!=nil {
70
+
exitWithError(err)
71
+
}
72
+
// list corrupted blocks with date ranges and prompt: "Do you want to delete corrupted blocks N,y ?"
0 commit comments