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

Cannot use duration values to set query start and end time #80

Closed
pierreaubert opened this issue Nov 27, 2013 · 1 comment
Closed

Cannot use duration values to set query start and end time #80

pierreaubert opened this issue Nov 27, 2013 · 1 comment

Comments

@pierreaubert
Copy link

Hello, i get a

_BUG_
Database: tcollector
Query: [select * from pages.free where time>13853965.0]
Error: runtime error: invalid memory address or nil pointer dereference. Stacktrace: goroutine 28 [running]:
engine.func·004()
/private/tmp/influxdb-3aZ7/influxdb/src/engine/engine.go:28 +0x116
datastore.(_LevelDbDatastore).sendBatch(0xc2000eaed0, 0xc2000e97e0, 0xc2009aa820, 0xc2009a4c40, 0x8, ...)
/private/tmp/influxdb-3aZ7/influxdb/src/datastore/leveldb_datastore.go:498 +0x136
datastore.(_LevelDbDatastore).executeQueryForSeries(0xc2000eaed0, 0xc200255506, 0xa, 0xc2006e3470, 0xa, ...)
/private/tmp/influxdb-3aZ7/influxdb/src/datastore/leveldb_datastore.go:474 +0xe99
datastore.(_LevelDbDatastore).ExecuteQuery(0xc2000eaed0, 0xc20015dc00, 0xc2000e57e0, 0xc200255506, 0xa, ...)
/private/tmp/influxdb-3aZ7/influxdb/src/datastore/leveldb_datastore.go:216 +0x3bd
coordinator.(_CoordinatorImpl).DistributeQuery(0xc200150800, 0xc20015dc00, 0xc2000e57e0, 0xc200255506, 0xa, ...)
/private/tmp/influxdb-3aZ7/influxdb/src/coordinator/coordinator.go:29 +0x72
engine.(*QueryEngine).distributeQuery(0xc2000d4a80, 0xc20015dc00, 0xc2000e57e0, 0xc200255506, 0xa, ...)
/private/tmp/influxdb-3aZ7/influxdb/src/engin

my env: macos x; v-0.3.0 installed via homebrew
select * from pages.free;
works as expected
if i had a where clause i get either no answer or no the above bug.

Hope this help

P.S.: i patched tcollector to push metrics (cpu, temp, load, ...) into influxdb for testing
if you are interested i will put it on github.

@jvshahid
Copy link
Contributor

jvshahid commented Dec 2, 2013

This issue is due to the fact that influxdb doesn't support duration values to set start and end time. This will be fixed in the next release. You have to keep in mind that by default influxdb will assume that the value is in nanoseconds, unless you add the 's' suffix to the value to tell influxdb that the value is in seconds. Your example query above should be select * from pages.free where time>13853965.0s (notice the s at the end of the query)

jvshahid pushed a commit that referenced this issue Aug 12, 2014
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