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.4 built off master] Cant do arithmetic on multiple fields #4046

Closed
desa opened this issue Sep 9, 2015 · 18 comments
Closed

[0.9.4 built off master] Cant do arithmetic on multiple fields #4046

desa opened this issue Sep 9, 2015 · 18 comments
Assignees
Milestone

Comments

@desa
Copy link
Contributor

desa commented Sep 9, 2015

Any mathematical expression involving two fields causes influx to crash

> insert m v1=1,v2=2
> select v1 - v2 from m
ERR: Get http://localhost:8086/query?db=idk&q=select+v1+-+v2+from+m: EOF
panic: runtime error: index out of range

goroutine 414 [running]:
github.com/influxdb/influxdb/influxql.func·027(0xc2090617e0, 0x2, 0x2, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/influxql/result.go:151 +0x4a
github.com/influxdb/influxdb/influxql.func·029(0xc2090617e0, 0x2, 0x2, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/influxql/result.go:173 +0xa8
github.com/influxdb/influxdb/influxql.func·029(0xc2090617e0, 0x2, 0x2, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/influxql/result.go:172 +0x67
github.com/influxdb/influxdb/tsdb.processForMath(0xc20eadfe58, 0x1, 0x1, 0xc209061820, 0x1, 0x1, 0x0, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/executor.go:989 +0x4ad
github.com/influxdb/influxdb/tsdb.(*limitedRowWriter).processValues(0xc20807c600, 0xc210b72000, 0x1, 0x2710, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/executor.go:882 +0xf45
github.com/influxdb/influxdb/tsdb.(*limitedRowWriter).Flush(0xc20807c600)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/executor.go:783 +0xd6
github.com/influxdb/influxdb/tsdb.(*SelectExecutor).executeRaw(0xc210b5a7e0, 0xc210453620)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/executor.go:251 +0x4e2
created by github.com/influxdb/influxdb/tsdb.(*SelectExecutor).Execute
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/tsdb/executor.go:94 +0x9a

goroutine 1 [chan receive]:
main.(*Main).Run(0xc20806bb40, 0xc20800a000, 0x0, 0x0, 0x0, 0x0)
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/cmd/influxd/main.go:91 +0x777
main.main()
    /Users/michaeldesa/go/src/github.com/influxdb/influxdb/cmd/influxd/main.go:42 +0xdc

goroutine 6 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/local/go/src/os/signal/signal_unix.go:27 +0x35
@otoolep
Copy link
Contributor

otoolep commented Sep 9, 2015

Dupe of #3200

@beckettsean
Copy link
Contributor

@otoolep this seems cleaner than #3200, which has a lot of confusion about duplicate field names. Should we close #3200 in favor of this one?

@otoolep
Copy link
Contributor

otoolep commented Sep 9, 2015

I'm OK with that @beckettsean

@corylanou
Copy link
Contributor

Adding math as a keyword on this issue. It was what I searched on and couldn't find this issue, and resulted in my creating a dupe.

@stropa
Copy link

stropa commented Oct 11, 2015

+1

@kostya-sh
Copy link
Contributor

Also dup of #4352

@pfennema
Copy link

Any idea when the issue of field calculations can be fixed? This functionality is for us an important factor to decide whether to continue with influxdb or not. Thanks! Again, really appreciating the work

@bww
Copy link

bww commented Nov 5, 2015

Does anyone know in which version this regression was introduced? Obviously we can't have this service crashing every minute, so we need to roll back to the latest version that works correctly.

@otoolep
Copy link
Contributor

otoolep commented Nov 5, 2015

@bww -- I believe this bug was introduced after 0.9.1. The query engine is undergoing significant refactor at the moment and the fix for this issue in the latest code will have to wait until that is finished.

@otoolep otoolep modified the milestones: 0.9.6, 0.9.5 Nov 5, 2015
@otoolep
Copy link
Contributor

otoolep commented Nov 5, 2015

Blocked by the query refactor redesign here: #4631

@jwilder jwilder added the panic label Nov 5, 2015
@otoolep otoolep assigned benbjohnson and unassigned otoolep Nov 7, 2015
@otoolep
Copy link
Contributor

otoolep commented Nov 7, 2015

@benbjohnson will be fixing this as part of his query engine refactor.

@malnor
Copy link

malnor commented Nov 26, 2015

+1

@otoolep otoolep changed the title [0.9.4 built off master] (regression) Cant do arithmetic on multiple fields [0.9.4 built off master] Cant do arithmetic on multiple fields Nov 30, 2015
@otoolep
Copy link
Contributor

otoolep commented Dec 4, 2015

Should be fixed by #4984

@otoolep otoolep closed this as completed Dec 4, 2015
@desa
Copy link
Contributor Author

desa commented Dec 4, 2015

@otoolep you sure? I'm still getting a panic on master.

@otoolep
Copy link
Contributor

otoolep commented Dec 4, 2015

Change was backed out pending CLA.

@otoolep
Copy link
Contributor

otoolep commented Dec 4, 2015

Merged now, build from master @mjdesa and let us know what you find.

@desa
Copy link
Contributor Author

desa commented Dec 4, 2015

@otoolep works 👍

@otoolep
Copy link
Contributor

otoolep commented Dec 4, 2015

Great! Thanks again to mengjinglei!

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

No branches or pull requests