Commit Graph

12174 Commits (4a87662d60eb469e190d80a32d3bcdae76d4a83c)

Author SHA1 Message Date
Edd Robinson 4a87662d60 Merge pull request #8621 from influxdata/er-go1.8-appveyor
Ensure Windows builds tested with Go 1.8
2017-07-24 16:28:43 +01:00
Edd Robinson e7f4b556fa Ensure Windows builds tested with Go 1.8 2017-07-24 13:56:19 +01:00
Jason Wilder 62534ce5c1 Merge pull request #8617 from influxdata/jw-go-19
Add go1.9 and tsi builders to circle
2017-07-21 13:03:49 -06:00
Jason Wilder 2c33919f9c Add build for go 1.9 2017-07-21 12:37:52 -06:00
Jason Wilder 01145d4e7e Add builder for tsi tests 2017-07-21 11:48:51 -06:00
Jonathan A. Sternberg 8bb80321d9 Merge pull request #8561 from influxdata/js-8525-query-http-pipelining
Support http pipelining for /query endpoint
2017-07-21 11:15:28 -05:00
Jonathan A. Sternberg 25e82d0e0e Merge pull request #8606 from influxdata/js-8601-cq-time-zones
Accomodate for time zones with continuous query scheduling
2017-07-20 16:44:03 -05:00
Jonathan A. Sternberg fd4e16dd02 Merge pull request #8613 from influxdata/js-8563-update-client-readme
Correct the client package README
2017-07-20 16:37:49 -05:00
Jonathan A. Sternberg 206fff70c6 Correct the client package README
Fixes #8563.
2017-07-20 14:56:04 -05:00
Jonathan A. Sternberg 506c06241b Fixed time boundaries for continuous queries with time zones
This calculates the start and end time along with any time zones shifts
so that continuous queries are run at the correct time when a time zone
is included in the query.
2017-07-20 14:30:52 -05:00
Jonathan A. Sternberg 39591e5375 Support http pipelining for /query endpoint
Removing the forced `Connection: close` header from the `/query`
endpoint. This was originally added because of golang/go#13165, but it
seems like it's possible to use pipelining with go 1.8 and http 1.1,
just not recommended.

After some testing, it appears that the channel returned by
`ResponseWriter.CloseNotify()` will not send a value if the connection
was not interrupted. We already account for this in /query by exiting
from the goroutine if the request has finished by signaling another
channel.

Since the handler already accounts for the possibility that the channel
will not signal and since `CloseNotify()` doesn't interfere with a
pipelined request, we can remove the forced `Connection: close` that was
added to force clients to establish a new connection.
2017-07-20 09:38:01 -05:00
Jonathan A. Sternberg a8f3fbf57e Merge pull request #8609 from influxdata/js-8480-default-stats-interval
Regenerate influxql package for #8480
2017-07-19 18:51:24 -05:00
Jonathan A. Sternberg 4f5423f90e Regenerate influxql package for #8480 2017-07-19 14:24:40 -05:00
Ryan Betts 0caa966f55 Merge pull request #8564 from influxdata/ryan-1426-reactlicense
Remove react library from dependencies licenses
2017-07-19 09:13:02 -04:00
Jonathan A. Sternberg 8dfd1f8c7c Merge pull request #8600 from influxdata/js-cq-interval-start
Fix the cq start and end times to use unix timestamps
2017-07-17 16:43:44 -05:00
Jonathan A. Sternberg f7d07910aa Fix the cq start and end times to use unix timestamps
The Go timestamp leads Truncate to start a week on Monday, but the query
engine uses unix timestamps which has the week start on a Thursday.

Updating the service so it uses a custom truncate method that uses the
unix timestamp instead of `time.Time`.

Fixes #8569.
2017-07-17 14:59:45 -05:00
Jason Wilder 4244d0e053 Merge pull request #8568 from influxdata/jw-tombstone-compress
Compress tombstone files
2017-07-10 11:28:09 -06:00
Jason Wilder c97bc4db5a Merge pull request #8579 from influxdata/jw-dup-points
Fix duplicate points returned after delete
2017-07-10 10:51:52 -06:00
Jason Wilder c25f7b8b3f Fix duplicate points returned after delete
The sortedSeriesIds slice was not getting reset to 0 which caused
the same series ids to exist in the slice more than once.  Since
the size of the slice never matched the size of the seriesID map,
it kept appendending to the slice and sorting it which cause multiple
cursor to get created for the same series.

Fixes #8531
2017-07-10 10:37:01 -06:00
Stuart Carnie 05f9977295 Merge pull request #8580 from influxdata/sgc-8500-deadlock
Free RLock prior to returning
2017-07-10 09:26:34 -07:00
Stuart Carnie 649beba8b3 update CHANGELOG 2017-07-08 08:46:27 -07:00
Stuart Carnie 2ccdda72a1 Free RLock prior to returning 2017-07-08 07:14:50 -07:00
Jason Wilder dba3ce1a42 Merge pull request #8576 from influxdata/jw-delete-index
Fix index inconsistency after deletes
2017-07-07 14:36:33 -06:00
Jason Wilder 3fac69464e Merge pull request #8577 from influxdata/jw-wal-sync-hang
Fix indefinite hang in WAL.writeToLog
2017-07-07 14:35:32 -06:00
Jason Wilder e9370e0b86 Fix indefinite hang in WAL.writeToLog
There was a race in the WAL writeToLog and scheduleSync which could
lead to a writing goroutine blocking indefinitely on its syncErr channel.

The issue was that the clearing of the syncCount happenend after the
wal was unlock.  If a goroutine was able to lock, write and call scheduleSync
before the existing scheduleSync goroutine returns and ran the defer to
clear the syncCount, then a new scheduleSync goroutine would not get started.
This left the writing goroutine block with nothing to signal it.

While in this state, a RLock on the engine was held.  If a Lock was requested
on the engine during this time, all future writes and queries would block waiting
on the blocked wal writer.

The fix is to move the atomic clearing of syncCount before the Lock is released.
2017-07-07 13:31:52 -06:00
Jason Wilder 5e11cdcdd7 Fix incorrect condition in OverlapsKeyRange
The min key was not used in OverlapsKeyRange which caused it to return
false when it should be true.  This causes a bug where deletes would not
write tombstones for files that actually contained the data it was supposed
to delete.
2017-07-07 12:19:33 -06:00
Jason Wilder 839cddf6d5 Refresh index after compactions
The in-memory index can get out of sync when deletes and writes
to the same measurement are running concurrently.  The index is
updated independently from data on disk and it's possible for the
index to unassign a shard when data still exists on disk.  What happens
is that there are TSM files on disk, but the index does not know that
the series that exist in those files still are in the shard.  Restarting
the server reloads the index and the data is visible again.  From and
end user perspective, this can look like more data is deleted than should
have been or that deleted data re-appears after a restart or writes to the
shard occur again.

There isn't an easy way to resolve this since the index and storage
are not transactional resources and we cannot atomically commit or
rollback changes to both at once.

As a workaround, after new TSM files are installed, we refresh the
index with series keys that exist in the new tsm files as well as
any lingering data still in the cache.  There is a small window of time
when the index may be missing series, but it will re-appear after the refresh
completes.
2017-07-07 12:19:30 -06:00
Adam 7ac4f5b8c2 Merge pull request #8574 from influxdata/plutonium#1240_master
Add X-Influxdb-Build  value to HTTP response header
2017-07-07 12:04:58 -04:00
Edd Robinson a43238618e Merge pull request #8512 from axiomhq/loglogbeta
Switch to LogLog-Beta Cardinality estimation
2017-07-07 16:14:16 +01:00
Adam 460b30bd08 removed blank line from changelog 2017-07-07 11:06:01 -04:00
Adam 2259ada8c3 adds a new header key/value X-Influxdb-Build that has value OSS if called from open-source build, and ENT if called from enterprise. This commit sets the value for the OSS case, and also creates the proper flag 2017-07-07 10:59:26 -04:00
Jason Wilder 16af32b2f9 Merge pull request #8567 from influxdata/jw-monitor-lock
Reduce lock contention when disabling compactions
2017-07-06 17:02:01 -06:00
Jason Wilder 3e7dfad7c4 Compress tombstone files
This adds a v3 format that is a gzip compressed version of the v2
format.  It reduces the size of tombstone files substantially without
having to support a more feature rich file format for tombstones.
2017-07-06 10:10:31 -06:00
Jason Wilder 9ac042b5cd Reduce lock contention when disabling compactions
The monitor goroutine calls enable compactions every 10s to spin down
(or start up) goroutines for cold shards.  This frequent Lock may be
causing lock contention for writes and queries which get blocked trying
to acquire an RLock.

The go RWMutex says that new RLock calls will block if there is a
pending Lock call that is blocked.  Switching the common path to use
an RLock should avoid the Lock and reduce lock contention for writes
and queries.
2017-07-05 15:42:21 -06:00
Edd Robinson 7374e4e8a4 Merge pull request #8550 from influxdata/er-8548-panic
Allow panic recovery mechanism to be disabled
2017-07-05 22:09:09 +01:00
Edd Robinson 36bdd832c0 Merge pull request #8562 from influxdata/er-8559-compaction-stuck
Ensure tmp files cleaned up when compaction disabled
2017-07-05 21:52:12 +01:00
Edd Robinson 101af89987 Update CHANGELOG 2017-07-05 16:35:41 +01:00
Ryan Betts ef4d55382b Remove react library from dependencies licences
The react library was removed when the admin gui was removed;
however, a reference to the library lingered in the third
party license file.

closes influxdata/plutonium#1426
2017-07-05 10:16:02 -04:00
Edd Robinson 0748d28986 Ensure tmp files cleaned up when compaction disabled 2017-07-04 20:04:23 +01:00
Seif Lotfy 4cb01c1768 change beta constants for the hll cardinality bias estimator 2017-06-30 07:47:16 -07:00
Edd Robinson 12248b7233 Allow panic recovery to be disabled
This commit adds a new environment variable INFLUXDB_PANIC_CRASH, which
when set to a truthy value, e.g., true, TRUE, 1, will prevent the server
from recovering from a panic.

Recover currently occurs in two places: the HTTP handler and the
QueryExecutor. INFLUXDB_PANIC_CRASH will control both.

Further, this commit adds _internal stats that will monitor the
occurrence of panics all the time (regardless of if INFLUXDB_PANIC_CRASH
has been set to true or not).

The recovered panic frequency can be inspected with the following
queries:

SELECT "recoveredPanics" FROM "_internal"."monitor"."httpd";
SELECT "recoveredPanics" FROM "_internal"."monitor"."queryExecutor";
2017-06-29 19:44:25 +01:00
Ben Johnson 8550fabf89 Merge pull request #8547 from benbjohnson/8500-inmem-defer-unlock
Defer unlock all write locks in inmem index.
2017-06-29 10:25:05 -06:00
Ben Johnson 9e64813db8
Defer unlock all write locks in inmem index.
Currently two write locks in `inmem` are obtained and then
manually unlocked at function exit points. However, we have
reports that the `inmem` index is hanging on a write lock and
cannot track the issue down to anything else besides a lock
that could have been left unlocked because of a panic.

This commit changes the two locks to always defer their unlocks
to prevent these hangs.
2017-06-29 10:23:13 -06:00
Mark Rushakoff e3918e0f91 Merge pull request #8543 from influxdata/mr-godep-sys
Add golang.org/x/sys to Godeps
2017-06-29 07:19:36 -07:00
Mark Rushakoff 69221ec9fe Add golang.org/x/sys to Godeps
This dependency appears to only be used when building for Solaris (mmap
dependency). It looks like this wasn't caught earlier due to gdm using
the current build tags to determine which files to process when saving
dependencies.
2017-06-28 14:20:09 -07:00
Ben Johnson 2f11347089 Merge pull request #8539 from benbjohnson/8513-tsi-fix-key-with-spaces
Fix TSI issue with spaces in tag values.
2017-06-28 13:05:51 -06:00
Ben Johnson f9dc61928a
Fix TSI issue with spaces in tag values. 2017-06-28 11:39:48 -06:00
Edd Robinson 87975c7b2b Merge pull request #8132 from influxdata/er-db-privs
Ensure privileges can't be set on non-existent DB
2017-06-27 13:12:00 +01:00
Jonathan A. Sternberg 5f8761a78f Merge pull request #8013 from Alienero/master
Remove the repeat code
2017-06-26 10:40:09 -05:00
Edd Robinson e1a5ee4ede Ensure privileges can't be set on non-existent DB 2017-06-26 14:15:52 +01:00