Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.9.3 built off master] Inserting value in scientific notation with a trailing i causes panic #3583

Closed
desa opened this issue Aug 6, 2015 · 1 comment
Assignees

Comments

@desa
Copy link
Contributor

desa commented Aug 6, 2015

Inserting a point with value in scientific notation with a trailing i causes the db to panic.

In the CLI

> insert sci value=9e10i
ERR: Post http://localhost:8086/write?consistency=any&db=mydb&precision=n&rp=: EOF

causes panic

panic: unable to parse number value '9e10i': strconv.ParseInt: parsing "9e10": invalid syntax

goroutine 56 [running]:
github.com/influxdb/influxdb/tsdb.newFieldsFromBinary(0xc20805a405, 0xb, 0x1fb, 0x8)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/points.go:1061 +0x63d
github.com/influxdb/influxdb/tsdb.(*point).unmarshalBinary(0xc20822c080, 0x8)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/points.go:949 +0x3b
github.com/influxdb/influxdb/tsdb.(*point).Fields(0xc20822c080, 0xc20810d9b0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/points.go:896 +0x28
github.com/influxdb/influxdb/tsdb.(*Shard).validateSeriesAndFields(0xc2080b4880, 0xc2085663c0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/shard.go:337 +0x5f7
github.com/influxdb/influxdb/tsdb.(*Shard).WritePoints(0xc2080b4880, 0xc2085663c0, 0x1, 0x1, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/shard.go:152 +0x75
github.com/influxdb/influxdb/tsdb.(*Store).WriteToShard(0xc20809a780, 0x266, 0xc2085663c0, 0x1, 0x1, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/store.go:281 +0xf7
github.com/influxdb/influxdb/cluster.func·002(0x266, 0x1, 0xc2085663c0, 0x1, 0x1)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/cluster/points_writer.go:241 +0xfc
created by github.com/influxdb/influxdb/cluster.(*PointsWriter).writeToShard
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/cluster/points_writer.go:271 +0x30b
@desa
Copy link
Contributor Author

desa commented Aug 6, 2015

Similarly

insert sci value=9ie10

also causes panic

panic: unable to parse number value '9ie10': strconv.ParseFloat: parsing "9ie10": invalid syntax

goroutine 55 [running]:
github.com/influxdb/influxdb/tsdb.newFieldsFromBinary(0xc208052405, 0xb, 0x1fb, 0x8)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/points.go:1061 +0x63d
github.com/influxdb/influxdb/tsdb.(*point).unmarshalBinary(0xc2080ac400, 0x8)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/points.go:949 +0x3b
github.com/influxdb/influxdb/tsdb.(*point).Fields(0xc2080ac400, 0xc2080c19b0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/points.go:896 +0x28
github.com/influxdb/influxdb/tsdb.(*Shard).validateSeriesAndFields(0xc2080ac500, 0xc208398d30, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/shard.go:337 +0x5f7
github.com/influxdb/influxdb/tsdb.(*Shard).WritePoints(0xc2080ac500, 0xc208398d30, 0x1, 0x1, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/shard.go:152 +0x75
github.com/influxdb/influxdb/tsdb.(*Store).WriteToShard(0xc208092780, 0x266, 0xc208398d30, 0x1, 0x1, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/store.go:281 +0xf7
github.com/influxdb/influxdb/cluster.func·002(0x266, 0x1, 0xc208398d30, 0x1, 0x1)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/cluster/points_writer.go:241 +0xfc
created by github.com/influxdb/influxdb/cluster.(*PointsWriter).writeToShard
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/cluster/points_writer.go:271 +0x30b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants