Commit Graph

893 Commits (5a61bdad704d99a2510119029d28c66b1f467471)

Author SHA1 Message Date
Jonathan A. Sternberg 559a11d0ab Pass the implicit end time from the query executor to the select call
The select call and the query executor would both calculate the time
range, but in separate ways. The query executor needed some way to pass
in the implicit end time that is placed there by the query executor.

Fixes #5636.
2016-02-12 16:03:24 -05:00
Mark Rushakoff fc9ab7a46f Miscellaneous cleanup in tsdb package
* When possible, initialize maps/slices to exact length/capacity
  * See slice benchmarks at
    https://gist.github.com/mark-rushakoff/b5650bd8f06bece0b9fd
* Fixed some typos
* Removed an unnecessary loop in stringset.intersect
2016-02-10 18:00:47 -08:00
Ben Johnson 0b3d367e5c Merge pull request #5623 from influxdata/jw-query-panic
Fix panic: runtime error: index out of range
2016-02-10 14:59:04 -07:00
Jason Wilder 0ce6dd1304 Fix panic: runtime error: index out of range
There was a fix in 5b1791, but is not present in the current branch likely due to a rebase issue.
The current code panics with a query like:

select value from cpu group by host order by time desc limit 1

This fixes the panic as well as prevents #5193 from re-occurring.  The issue is that agressively
closing the cursors clears out the seeks slice so re-seeking will fail.
2016-02-10 14:00:58 -07:00
Justin Nuß 82c276756a Lint tsdb and tsdb/engine package 2016-02-10 21:33:46 +01:00
Ben Johnson d9a6a7340f add canonical paths 2016-02-10 11:30:52 -07:00
Ben Johnson 5a0d1ab7c1 rename influxdb/influxdb to influxdata/influxdb
This commit changes all the import and URL references from:

    github.com/influxdb/influxdb

to:

    github.com/influxdata/influxdb
2016-02-10 10:26:18 -07:00
Jonathan A. Sternberg 2e7cf5328c Fix go vet issues on 1.4
go 1.5 was being used to develop the query engine branch, but we aren't
using 1.5 for master at the moment. This fixes issues that go vet brings
up in 1.4 that don't exist in 1.5.
2016-02-10 09:40:30 -07:00
Jonathan A. Sternberg d1f7c445e7 Modify iterators to work across shards
Aux iterators now ask the iterator creator what series will be returned
and determine which aux fields to create based on the results.

The `tsdb.Shards` struct also creates a call iterator around the
iterators returned from each shard.
2016-02-10 09:40:29 -07:00
Ben Johnson 32be4c250f fix non-existent shard handling
This commit removes `nil` shards returned from `tsdb.Store.Shards()`
which caused panics in some SELECTs. This can occur if the meta
store has created shards before the store or if the shards are
distributed throughout a cluster.

Fixes #5555
2016-02-10 09:40:29 -07:00
Jonathan A. Sternberg c2d1206177 Implement the fill iterator
Fill requires an additional function for IteratorCreator to retrieve the
series that will be returned from the iterator. When fill is required
for an aggregate, the IteratorCreator will be asked what series will be
returned by the created iterator.
2016-02-10 09:40:29 -07:00
Ben Johnson 627cd9d486 add dedupe iterator 2016-02-10 09:40:29 -07:00
Ben Johnson 47c2bab74b add SHOW TAG KEYS support 2016-02-10 09:40:28 -07:00
Ben Johnson 607750ab1b add SHOW MEASUREMENTS iterator 2016-02-10 09:40:28 -07:00
Ben Johnson 2bdc9404ef revert meta execution 2016-02-10 09:40:28 -07:00
Ben Johnson 6204350d65 fix math operations 2016-02-10 09:40:27 -07:00
Ben Johnson b4cb770a7f refactor aux iterators 2016-02-10 09:40:27 -07:00
Ben Johnson b8918a780c integer support 2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg 583477064c Check for `tsdb.EOF` when looking for the lowest timestamp of aux fields 2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg 34f14424dd Filter tags from the condition when building cursors on tsm1 2016-02-10 09:40:25 -07:00
Ben Johnson 00806de9b8 refactor query engine 2016-02-10 09:40:25 -07:00
Ben Johnson 57336bd6ee fix conditionals 2016-02-10 09:40:24 -07:00
Ben Johnson 036382ee20 SLIMIT/SOFFSET 2016-02-10 09:40:24 -07:00
Ben Johnson cde973f409 refactor query engine 2016-02-10 09:40:24 -07:00
Gabriel Levine 7d4217ab97 enabled golint for tsdb/engine/wal.go and wal_test.go and updated changelog. 2016-02-09 10:29:09 -05:00
Jason Wilder 2b3c640695 Fix reading too far in fileAccess.readBytes
Fixes #5566
2016-02-08 09:08:57 -07:00
Jason Wilder 28ae8b6fe0 Merge pull request #5434 from runner-mei/tsm_tombstone_windows
fix TSMReader.Delete() and all unit tests is pass in the windows
2016-02-04 16:27:26 -07:00
Jason Wilder b635e516e5 Merge pull request #5485 from runner-mei/patch-7
fix munmap bug in the windows
2016-02-04 13:47:51 -07:00
Jason Wilder 5a124e0e0b Merge pull request #5431 from runner-mei/patch-5
fix determine the file size
2016-02-04 10:24:05 -07:00
INADA Naoki 80a637904d tsm1: Use unixnano instead of time.Time 2016-02-03 10:05:40 +09:00
INADA Naoki 771253256b FloatValue uses unixnano instead of time.Time 2016-02-03 09:57:00 +09:00
INADA Naoki 898babf616 add float bench 2016-02-03 03:12:16 +09:00
Cory LaNou a171089fce fix vet error 2016-02-01 15:33:54 -06:00
Joe LeGasse 4b642fb365 Added tests for tsdb.greaterThan()
Also updated style to match "Effective Go" recommendations.
2016-02-01 15:11:17 -05:00
Joe LeGasse 2bd85b3c9e Update first() and last() to handle varying types 2016-02-01 11:38:08 -05:00
runner.mei 4ca47103b1 fix TSMReader.Delete() and all unit tests is pass in the windows 2016-01-31 11:32:08 +08:00
runner bc992fea5e fix munmap bug in the windows
fix munmap bug in the windows

fix munmap bug in the windows

fix munmap bug in the windows

fix munmap bug in the windows
2016-01-31 10:46:46 +08:00
runner 4b7fe70cd3 fix determine the file size
fix determine the file size
2016-01-30 14:16:53 +08:00
runner.mei 53f7e03f72 fix TSMReader.Delete() and all unit tests is pass in the windows 2016-01-30 14:15:46 +08:00
Jason Wilder 924275b337 Fix panic preventing wal file truncation
Fixes #5455
2016-01-28 21:50:51 -07:00
Jason Wilder 9528c3ea70 Merge pull request #5465 from influxdata/jw-remote-writes
Optimize remote writes
2016-01-27 15:47:02 -07:00
Jason Wilder 1d165d38a9 Optimize Cache entry.add
This reduces some of the lock contention when writing to the cache.
When a new entry is created, it avoids an allocation.  It also skips
a check to see if we need to sorted if we already know it needs to sorted.
2016-01-27 14:26:42 -07:00
Ben Johnson 98baf078d0 tsm1 query performance improvements 2016-01-27 13:42:32 -07:00
Jason Wilder 372302bcbd Reduce lock contention in Cache.WriteMulti
A write-lock was taken the whole time, but we only need the write
lock at the end.
2016-01-25 16:48:34 -07:00
Jason Wilder 5bee8880db Reduce lock content in engine.WritePoints
Writing the snapshot would deduplicate the snapshot points
while still holding the engine write-lock.  This can be expensive
under high load and cause writes to back up and OOM the server.

Instead, grab the snapshot under the lock and dedup it after releasing
the lock.

Possible fix for #5442
2016-01-25 15:37:34 -07:00
Jason Wilder ad52d0fbd9 Fix tests 2016-01-21 15:30:09 -05:00
Paul Dix f385945058 Update Server to work with new metaservice/client 2016-01-21 15:28:33 -05:00
Cory LaNou 9ec7a710c9 some misc refactoring on influxd startup 2016-01-21 15:28:32 -05:00
Cory LaNou 8d878fff91 buildable meta -> services/meta 2016-01-21 15:28:32 -05:00
Ben Johnson ba7fc7d548 Merge pull request #5333 from benbjohnson/limit
Limit raw query fetch
2016-01-12 17:06:41 -08:00