Commit Graph

7307 Commits (97f2dc830f2cd4cb71d0046fda94ae64b35707df)

Author SHA1 Message Date
Jason Wilder f5f8f04116 Fix panic in addToCache
addToCache is called in a goroutine and can panic if the server is closed while opening.  If
part of the open func errors, it returns an error and immediately calls close.  close sets
p.cache to nil which causes the goroutine trying to initialized the cache to panic as well.  The
goroutine should run under a write lock to avoid this race/panic.
2015-08-28 13:01:17 -06:00
Jason Wilder eb4a8d4f4a Fix panic when logging error in WAL
If LoadMetadataIndex() tries to log an error, it causes a panic because the
logger is not set until Open() is called, which is after LoadMetaDataIndex() returns.
Instead, just set the logger up when the WAL is created.
2015-08-28 12:59:38 -06:00
Philip O'Toole cf58c38995 go fmt fixes 2015-08-27 18:20:41 -07:00
Philip O'Toole 52ecfffce7 Merge pull request #3877 from influxdb/rm_obsolete_diags
Remove obsolete diagnostics code
2015-08-27 17:24:45 -07:00
Philip O'Toole 6453777bc0 Remove obsolete diagnostics code 2015-08-27 17:07:00 -07:00
Philip O'Toole 841319e8a0 Account for older-style response in tests
It appears this response may still be emitted sometimes.
2015-08-27 16:23:59 -07:00
Philip O'Toole 584d3c68ea Minor formatting typo in CHANGELOG 2015-08-27 16:11:51 -07:00
Philip O'Toole 5cf8920d4d Merge pull request #3856 from influxdb/retention_tweaks
Minor retention tweaks
2015-08-27 16:10:37 -07:00
Philip O'Toole 3184103c2a Update CHANGELOG 2015-08-27 16:09:48 -07:00
Philip O'Toole d771612718 Set default retention check interval to 30 minutes
Since the minimum retention period is 1 hour, checking every 10 minutes
seems excessive and generates noise in the logs.
2015-08-27 16:08:03 -07:00
Philip O'Toole ae825fdf3d Correct typo in retention service logs 2015-08-27 16:08:03 -07:00
Philip O'Toole afa3cd02c7 Merge pull request #3863 from influxdb/move_to_go1.5
Move to Go 1.5
2015-08-27 15:27:26 -07:00
Jason Wilder 6493cfdc45 Merge pull request #3870 from influxdb/jw-3869
Remove unused Database index names and sorting
2015-08-27 14:00:30 -06:00
Daniel Morsing bb36faff4c Merge pull request #3862 from influxdb/seekonce
WIP don't bother seeking a cursor if it wont yield a useful value
2015-08-27 13:36:47 -06:00
Philip O'Toole 55d71a075c Explicit sync with test server to avoid races
From
516f0d1c90

"Note that we use a channel send here and not a close.
The race detector doesn't know that we're waiting for a timeout
and thinks that the waitgroup inside httptest.Server is added to
concurrently with us closing it. If we timed out immediately, we could close
the testserver before we entered the handler. We're not timing out immediately
and there's no way we would be done before we entered the handler, but the
race detector doesn't know this, so synchronize explicitly.
2015-08-27 11:51:02 -07:00
Jason Wilder a4c1d9a9a7 Remove unused Database index names and sorting
Writes could timeout and when adding new measurement names to the
index if the sort took a long time.  The names slice was never
actually used (except a test) so keeping it in index wastes memory
and sort it wastes CPU and increases lock contention.  The sorting
was happening while the shard held a write-lock.

Fixes #3869
2015-08-27 11:57:20 -06:00
dgnorton fec53e8357 Merge pull request #3866 from influxdb/dgn-influxql-spec-update
update INFLUXQL.md
2015-08-27 13:35:38 -04:00
aviau 0b4a55ded6 Fix 32bit Dockerfile 2015-08-27 09:58:19 -07:00
Philip O'Toole e7978a0995 Install Go 1.5 in the Docker i386 container 2015-08-27 09:58:19 -07:00
Philip O'Toole 05a124b24d Update CHANGELOG 2015-08-27 09:58:19 -07:00
Philip O'Toole 191163c7c7 Move to Go 1.5 2015-08-27 09:58:15 -07:00
Daniel Morsing ca7a806e93 Only seek the cursor if it would yield a value of interest
If we've seeked a cursor, then we can be sure that there will be no
data between it and the point that was seeked to. Take advantage of
this fact to only seek when it would yield us a value that would be
different from the last.

In addition, only init the pointsheap when doing a raw query. For
aggregate queries, it is reinitialized on every time bucket, so no
need to seek through all the cursors

For a synthetic database where there was only entries for a tiny
slice of time, it cut queries from 112 seconds to 30 seconds doing
`select mean(value) from cpu where time > now - 2h group by time(1h)`
2015-08-27 10:57:18 -06:00
Swann Croiset 421fc875ca Add shell option to start the daemon on CentOS
Unless a valid shell for the user running influxdb, the command su fails with
the error:
 This account is currently not available.

The user shouldn't have a valid shell although the package creates influxdb
user with /bin/bash
2015-08-27 15:32:05 +02:00
David Norton 3c45838c10 update INFLUXQL.md 2015-08-27 08:38:16 -04:00
Philip O'Toole a74f7e32aa Merge pull request #3859 from influxdb/log_go_version
Log Go runtime version
2015-08-26 14:59:08 -07:00
Philip O'Toole 94484067f3 Log Go runtime version 2015-08-26 14:47:59 -07:00
Sean Beckett ecd35c9678 Update CHANGELOG.md 2015-08-26 14:40:33 -07:00
Philip O'Toole ad94329fba Fix typo in 0.9.3 release date 2015-08-26 14:37:44 -07:00
Philip O'Toole e33ca89559 0.9.3 is out 2015-08-26 14:37:22 -07:00
Paul Dix f865648403 Update README.md 2015-08-26 17:24:24 -04:00
Jason Wilder 4d417db3b0 Merge pull request #3857 from influxdb/jw-deadlock
Fix deadlock in metastore
2015-08-26 14:50:32 -06:00
Jason Wilder 0286a3e7fe Fix deadlock in metastore
The interaction of continuous query service, the meta-store loading
and initializing raft state, and syncing node info could cause a
deadlock in some instances.  There was an extra read-lock taken by isLeader()
when it already had a read-lock.  Removing this extra lock fixes the startup
deadlock.

Fixes #3607
2015-08-26 14:43:17 -06:00
Paul Dix 0a51b1f584 Merge pull request #3853 from benbjohnson/4k
Use 4KB default block size for bz1
2015-08-26 13:22:33 -04:00
Ben Johnson 3ce001929c Use 4KB default block size for bz1
This commit changes the default block size from 64KB to 4KB for
bz1. This was lowered because small blocks were being uncompressed,
merged, recompressed, and inserted for a large portion of updates.
This became slower and slower over time until it reached the 64KB
threshold. We moved to the 4KB threshold in order to lower the
impact of this recompression.
2015-08-26 11:05:01 -06:00
dgnorton 2cf6233cbc Merge pull request #3808 from influxdb/dmq-show-measurements2
convert SHOW MEASUREMENTS to a distributed query
2015-08-26 11:43:38 -04:00
Philip O'Toole 8f4fc3b9c6 Merge pull request #3823 from influxdb/deterministic_first_last
Enforce predictable order for first() and last()
2015-08-26 08:42:28 -07:00
Philip 5f5c3a30b2 Update CHANGELOG 2015-08-25 22:31:47 -07:00
Philip O'Toole 10779c9634 Unit-test predictable first/last point ordering 2015-08-25 22:26:04 -07:00
Philip 45cc51edfe During first() and last(), break any tie by value
If 2 or more points during this map-and-reduce share the same timestamp,
the tie is broken by looking at the value. This ensures that these
functions operate in a deterministic manner.

This solution due to @jwilder
2015-08-25 22:26:03 -07:00
Daniel Morsing 3d92f3ab0a Merge pull request #3846 from influxdb/reuseheap
reuse pointsheapItem
2015-08-25 17:27:49 -06:00
Daniel Morsing 391d8cd8d7 reuse pointsheapItem
Since we already got a pointsHeapItem, let's just reuse it instead
of allocating a new one. This cuts allocated memory of a 1 million
points aggregate query from 4881.97MB to 4139.86MB
2015-08-25 17:07:34 -06:00
Paul Dix d903cc351e Merge pull request #3845 from influxdb/pd-fix-wal-meta-panic
Fix metafile so it doesn't get trampled by other goroutines.
2015-08-25 18:35:03 -04:00
Philip O'Toole 2b8858baa7 Merge pull request #3842 from influxdb/loop_queries
Allow queries to be looped
2015-08-25 15:24:12 -07:00
Paul Dix 0d744dafed Fix metafile so it doesn't get trampled by other goroutines.
Fixes #3832 and fixes #3833
2015-08-25 18:23:24 -04:00
Philip O'Toole ca52a3ffd7 Allow queries to be looped
Some queries may be subject to race conditions. This variable allows the
test to request that a query is executed multiple times, increasing the
chance that any race will be exposed.
2015-08-25 15:16:13 -07:00
Daniel Morsing db2bff682b Merge pull request #3836 from influxdb/unusedbuffer
Remove unused buffer allocation
2015-08-25 15:51:02 -06:00
Daniel Morsing 71a83b7f9d Remove unused buffer allocation
The buffer allocation in bz1 was unused and I'm fairly certain that it
was harmful to performance if used. For queries that run through a bz1
block, needing to hold on to a 64kb block is expensive. Better to churn
on the allocator and have the blocks be released when they are unused
than to have 64kb hanging around for each series regardless of size.

Thanks to @jwilder for brainstorming this issue with me.
2015-08-25 14:51:17 -06:00
Paul Dix a4735624f8 Merge pull request #3829 from influxdb/pd-fix-missing-data-after-flush
Fix missing data in aggregates with bz1
2015-08-25 16:27:03 -04:00
David Norton d8be9b4222 test SHOW MEASUREMENTS when no rows returned 2015-08-25 16:18:28 -04:00
Paul Dix 8c6af91e93 Fix bug with bz1 where some data would get hidden.
Seeking to the middle of a compressed block wasn't working properly. Fixes #3781
2015-08-25 16:16:59 -04:00