Fix snappy decode error w/ influx_inspect

pull/5142/head
Jason Wilder 2015-12-15 23:28:31 -07:00
parent 88324bf61c
commit 93d93797da
1 changed files with 3 additions and 3 deletions

View File

@ -550,14 +550,13 @@ func cmdDumpTsm1dev(opts *tsdmDumpOpts) {
f.Seek(int64(e.Offset), 0)
f.Read(b[:4])
chksum := btou32(b)
chksum := btou32(b[:4])
buf := make([]byte, e.Size)
buf := make([]byte, e.Size-4)
f.Read(buf)
blockSize += int64(len(buf)) + 4
startTime := time.Unix(0, int64(btou64(buf[:8])))
blockType := buf[0]
encoded := buf[1:]
@ -568,6 +567,7 @@ func cmdDumpTsm1dev(opts *tsdmDumpOpts) {
fmt.Printf("error: %v\n", err.Error())
os.Exit(1)
}
startTime := v[0].Time()
pointCount += int64(len(v))