Commit Graph

9504 Commits (6f39b355bc47915aeadaa68fe404aba86fe9b5c5)

Author SHA1 Message Date
Jason Wilder 6f39b355bc Code cleanups 2016-02-22 15:06:05 -07:00
Jason Wilder a2d3d44505 Fix creating meta only nodes
This fixes a couple of issues with starting meta-only nodes.

1. We were always calling CreateDataNode regardless of whether the the
node is running data services.  We only call that now when node is
data enabled.
2. The node.json was created along-side creating the data node. Since
we are not creatinga a data node, this didn't happen anymore.  There
wasn't a simple way to do this in one place so it's actually handle
for when creating a meta or a data node now.  Since the ID assigned
to the node is the same regardless of role this works in all combinations
of roles.
3. The JoinMetaServer didn't return the ID of the joining node which
created some races when multiple nodes were joining.  The join call now
returns that information to the caller.

Fixes #5754
2016-02-22 15:06:05 -07:00
Jason Wilder 194d8d4693 Ensure monitor store is disabled for meta only nodes
We can't store points locally so ensure it's disabled for now.
2016-02-22 15:05:47 -07:00
Jason Wilder a437002969 Fix join option in config file
The join option was incorrectly exposed on the meta config.  It should
be at the top-level as a string and propogate down to the meta config
as a slice.
2016-02-22 15:05:46 -07:00
Mark Rushakoff 7f457b8852 Merge pull request #5786 from influxdata/mr-fix-tsm1-test-compilation
Fix non-compiling test
2016-02-22 14:04:05 -08:00
Mark Rushakoff 191de2670c Fix non-compiling test 2016-02-22 13:49:11 -08:00
Mark Rushakoff fc5c8597ab Merge pull request #5758 from influxdata/mr-disk-stats
Track cache, WAL, filestore stats within tsm1 engine
2016-02-22 13:01:55 -08:00
Mark Rushakoff 688863cec5 Update changelog 2016-02-22 12:51:52 -08:00
Jason Wilder e25b5abf61 Merge pull request #5751 from influxdata/jw-5719
Fix cache not deduplicating points in some cases
2016-02-22 13:41:17 -07:00
Jason Wilder aa2e878019 Fix cache not deduplicating points in some cases
The cache had some incorrect logic for determine when a series needed
to be deduplicated.  The logic was checking for unsorted points and
not considering duplicate points.  This would manifest itself as many
points (duplicate) points being returned from the cache and after a
snapshot compaction run, the points would disappear because snapshot
compaction always deduplicates and sorts the points.

Added a test that reproduces the issue.

Fixes #5719
2016-02-22 13:24:42 -07:00
Mark Rushakoff c7223157a6 Merge commit 'c93da21' into mr-disk-stats 2016-02-22 09:32:56 -08:00
Jonathan A. Sternberg b6a0b6a65a Merge pull request #5742 from influxdata/js-ensure-non-empty-column-names
Ensure column names get implicitly renamed with conflicts
2016-02-22 08:55:38 -05:00
Jonathan A. Sternberg 87e04b1a46 Merge pull request #5776 from influxdata/js-5773-unsupported-call-panic
Replace a panic with returning an error when an unsupported call is used
2016-02-22 08:17:59 -05:00
Edd Robinson 10b9befd82 Merge pull request #5716 from jonseymour/js-tolerate-empty-field-names
models: tolerate empty field names when unpacking binary points
2016-02-22 12:44:45 +00:00
Jon Seymour c93da21a61 tsm: cache: only use NewCache for engine cache's snapshots use a simpler constructor
The intent of this change is to avoid writing caches created for
snapshot cache instances into the tsm1_cache measurement. We can do
this by avoiding use of the NewCache constructor. All other methods
are only intended to be called from on the engine cache - never
on a snapshot.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-22 15:17:43 +11:00
Jonathan A. Sternberg 6982d5310e Replace a panic with returning an error when an unsupported call is used
Fixes #5773.
2016-02-21 19:39:14 -05:00
Mark Rushakoff 2ab79e75eb Merge pull request #5775 from jonseymour/jss-5499-extend-tsm-cache-stats
tsm: cache: during writes, update the memSize statistic outside the lock
2016-02-21 14:36:56 -08:00
Jon Seymour 510ee2c790 tsm: cache: during writes, update the memSize statistic outside the lock
Since we are not locking but relying on atomic arithmetic,
use Add rather than Set. Will also result in slightly less garbage
being created.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-22 08:26:35 +11:00
Mark Rushakoff feceb4dae1 Merge pull request #5769 from jonseymour/jss-5499-extend-tsm-cache-stats
tsm: cache: ensure all statistics are initialised on cache creation.
2016-02-21 07:25:49 -08:00
Jon Seymour 9c6efe99f1 tsm: cache: ensure all statistics are initialised on cache creation.
The intent of this change is to ensure that all statistic fields of the
resulting tsm1_cache measurement are initialized on initialization of
the cache. That way, any consumer of those measurements doesn't
have to deal with the null case.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-21 15:33:50 +11:00
Mark Rushakoff 04645188fa Merge pull request #5762 from jonseymour/jss-5499-extend-tsm-cache-stats
tsm: cache: add cache throughput related statistics.
2016-02-20 10:15:17 -08:00
Jon Seymour a8877badcd Update CHANGELOG for #5716, #5664
Note that this series also includes cherry-pick of #5697.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-21 03:56:37 +11:00
Jon Seymour d46e0407a0 Merge #5716
RHS merges cleanly with 0.10.0 maintenance branch.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-20 22:24:03 +11:00
Jon Seymour 9491846047 models: improve handling of points with empty field names or with no fields
Influx does not support fields with empty names or points
with no fields.

NewPoint is changed to validate that all field names are non-empty.

AddField is removed because we now require that all fields are
specified on construction.

NewPointFromByte is changed to return an error if a unmarshaled
binary point does not have any fields.

newFieldsFromBinary is changed to prevent an infinite loop that
can arise while attempting to parse corrupt binary point data.

TestNewPointsWithBytesWithCorruptData is changed to reflect the
change in the behaviour of NewPointFromByte.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-20 22:22:26 +11:00
Jon Seymour 6697c721fb tsm: cache: add cache throughput related statistics.
Complementing and extending the changes in #5758.

Add 2 level statistics:

  * snapshotCount
  * cacheAgeMs

Add 2 counter statistics

  * cachedBytes
  * WALCompactionTimeMs

snapshotCount can be used to measure transient write errors that are causing snapshots to accumulate

cacheAgeMs can be used to guage the level of write activity into the cache

The differences between cachedBytes stats sampled at different times can be used to calculate cache throughput rates

The ratio (cachedBytes-diskBytes)/WALCompactionTimeMs can be used calculate WAL compaction throughput.

The ratio of difference between first and last WAL compaction time over the interval
length is an estimate of percentage of cache throughput consumed.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-20 22:18:57 +11:00
Mark Rushakoff 602043e11b Add disk stats for FileStore 2016-02-19 16:37:34 -08:00
Mark Rushakoff d99c09cedd Add stats for current and old WAL segment sizes 2016-02-19 16:37:34 -08:00
Mark Rushakoff e76967efb6 Add stats to tsm1.Cache 2016-02-19 16:37:34 -08:00
Gunnar c1de263858 Merge pull request #5710 from influxdata/ga-admin
Move admin UI assets to the admin service directory
2016-02-19 15:36:23 -08:00
Jonathan A. Sternberg 328f505c93 Merge pull request #5745 from influxdata/js-5740-mixed-float-integer-math
Update binary expressions to handle mixed math between integers and floats
2016-02-19 16:05:16 -05:00
Jonathan A. Sternberg a8d637b03c Ensure column names get implicitly renamed with conflicts 2016-02-19 14:35:56 -05:00
Jonathan A. Sternberg f84556fe22 Update binary expressions to handle mixed math between integers and floats
This also changes it so all NumericLiterals are treated as a float
rather than sometimes being cast to an integer.

Fixes #5740.
2016-02-19 14:32:22 -05:00
Jonathan A. Sternberg 8fc6a0f648 Merge pull request #5732 from influxdata/js-5730-binary-expr-column-name
Assign a name to columns with binary expressions in them
2016-02-19 14:30:43 -05:00
Edd Robinson 2da8321128 Merge pull request #5691 from influxdata/er-retention-policies
Clean up shard data when dropping retention policies
2016-02-19 11:32:54 +00:00
Edd Robinson 99a7341701 Wire up DROP retention policy to TSDB store.
Fixes #5653 and #5394.

Previously dropping retention policies did not propogate to local TSDB
shards. Instead, the retention policiess would just be removed from the
Meta Store.

This PR adds ensures that data associated with retention policies is
removed, when the retention policy is dropped.

Also, it cleans up a couple of other methods in `tsdb`, including the
requirement to provide (redundant) shardIDs when deleting databases.
2016-02-19 11:15:00 +00:00
Jon Seymour bfb361e854 models: add tests for point construction
These tests check that NewPoint and NewPointFromBytes return an error if:

* arguments specify a point with no fields
* arguments specify a point with a field that has an empty name

These tests also check that Point.Fields() always returns, even in the presence
of corrupt binary data read with NewPointFromBytes.

These tests fail at this commit and are fixed by a subsequent commit.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-19 17:58:38 +11:00
Jason Wilder 645eb44ea9 Merge pull request #5735 from influxdata/kostasb-screen-influx_tsm
screen suggestion for influx_tsm
2016-02-18 16:08:40 -07:00
Jonathan A. Sternberg e58f66845c Merge pull request #5658 from influxdata/js-mean-iterator
Optimize the mean() call by moving the calculation into the shard iterator
2016-02-18 17:27:46 -05:00
Mark Rushakoff b72c684afb Merge pull request #5681 from influxdata/mr-expand-stats
Add more stats for httpd, query executor
2016-02-18 14:11:09 -08:00
Jason Wilder 26163cb03b Merge pull request #5706 from influxdata/jw-cluster
Cluster Setup
2016-02-18 15:08:15 -07:00
Mark Rushakoff c2d2e23832 Update changelog 2016-02-18 13:55:46 -08:00
Jason Wilder 04ba79407a Add join config option back 2016-02-18 14:45:35 -07:00
Jason Wilder 886a62008e Fix dropping nodes
Dropping a meta node that had already been removed from the config
would fail because the raft.RemovePeers call would return an error
that the address was unknown.  This change skips calling RemovePeer
if it doesn't exist.

Dropping a non-existing ID would hang for 10 seconds becuase the
meta.Client retryUntilExec didn't differentiate before command errors
and redirect errors.  In this case, the command would return an error
but we'd try 10 more times and ultimately give up and return the error.
We now return immediately if the command returned and error because
retrying it will not succeed.

Finally, the join loop had no delay and would immediately try to join
the other nodes hundreds of times a second.  We now pause a second if we've
tried every node at least once.
2016-02-18 14:45:34 -07:00
Jason Wilder dedd6f2e9e Fix hostname/bind addresses
This fixes several issues related to the bind address and hostname:
* Allows bind addresses where a hostname or IP is not specified to
work correct and bind to all interfaces by default.
* Fixes the top-level "hostname" config option to allow overridding
all bind address hostnames.  This allows a node to advertise a different
hostname than what is defined in the bind address setting.
* Adds the -hostname command-line option back to allow specifing
both -join and -hostname as command-line flags.
* Enforces a configuration precedence and overriding ability defined
as config file is overridden by env vars which are overriden by command-line
flags.

Fixes #5670 #5671
2016-02-18 14:45:34 -07:00
Jason Wilder a90114aa4d Use same node ID for meta and data nodes
Fixes #5669
2016-02-18 14:45:34 -07:00
Ben Johnson ae7b027742 Merge pull request #5366 from gabelev/lint_influxql
Refactoring influxql package to enable golint
2016-02-18 14:24:37 -07:00
Jason Wilder 04b3914b33 Merge pull request #5743 from influxdata/mr-meta-httpd-headers
Update HTTP headers in meta service's httpd
2016-02-18 13:59:46 -07:00
joelegasse b709f3279b Merge pull request #5542 from influxdata/jl-binary-cleanup
Remove custom binary-conversion functions
2016-02-18 15:57:25 -05:00
Gabriel Levine a9fcc3229a Enable golint for influxql package. 2016-02-18 15:52:37 -05:00
Mark Rushakoff c295db0a49 Fix Content-Type headers in meta httpd 2016-02-18 12:34:29 -08:00