Commit Graph

170 Commits (522c32754c95da79c3811b397ded4ff4f75c33e0)

Author SHA1 Message Date
Edd Robinson 90ff713f21 Fix base64 encoding issue in stats
Fixes #7177.
2016-08-22 15:21:31 +01:00
Ben Johnson 8aa224b22d
reduce memory allocations in index
This commit changes the index to point to index data in the shards
instead of keeping it in-memory on the heap.
2016-08-16 14:09:00 -06:00
Jason Wilder d432aaa84d Fix panic with parsing empty key
Fixes #6990
2016-07-28 18:38:17 -06:00
Cory LaNou 968d322d6d finish tsm file exporter 2016-07-21 17:20:51 -05:00
Jonathan A. Sternberg 837a9804cf Refactoring the monitor service to avoid expvar
Truncate the time interval output of the monitor service to be on even
time intervals rather than on every minute based on the start time. This
normalizes the output from the monitor service.
2016-07-07 11:13:58 -05:00
Jonathan A. Sternberg 497db2a6d3 Removing dead code from every package except influxql
The tsdb package had a substantial amount of dead code related to the
old query engine still in there. It is no longer used, so it was removed
since it was left unmaintained. There is likely still more code that is
the same, but wasn't found as part of this code cleanup.

influxql has dead code show up because of the code generation so it is
not included in this pruning.
2016-06-20 22:41:07 -05:00
Jonathan A. Sternberg 8e1b036b0a Modify the max nanosecond time to be one nanosecond less
The highest time represented by a nanosecond needs to be used for an
exclusive range, so the maximum time needs to be one less than the
possible maximum number of nanoseconds representable by an int64 so that
we don't lose a point at that one time.

Previously worked in the open source version because the timestamp used
for finding a shard would be truncated by the retention policy so the
lookup time didn't run into this edge case because it didn't rest on the
truncation boundary. Since that point didn't really belong in that shard
group and was placed there by mistake, it's best to fix this bug since
the timestamp used to create the shard group should be capable of
retrieving it.
2016-06-16 12:15:41 -05:00
Jonathan A. Sternberg 3bd9425edb Fix the point validation parser to identify and sort tags correctly
Fixes #6771.
2016-06-13 09:45:10 -05:00
Jason Wilder ff2475bf7c Prevent allocation in unesecapeTag 2016-05-27 10:30:08 -06:00
Jason Wilder 97ad5fd2e6 Add ParseKey benchmark 2016-05-27 10:30:08 -06:00
Edd Robinson f7c7b89b65 Merge pull request #6675 from influxdata/er-future-meta
Ensure meta SHOW queries include future points
2016-05-27 13:02:23 +01:00
Edd Robinson f4fc905fa9 Reject timestamps too far in future 2016-05-27 11:07:48 +01:00
Edd Robinson 46489a5195 Fix vet issue 2016-05-27 10:31:20 +01:00
Edd Robinson 39f3480f28 Ensure points with trailing whitespace are accepted 2016-05-26 19:00:24 +01:00
Jason Wilder 8082fc61ba Fix parsing keys when loading database index
The code for parsing a key our of the WAL or TSM files in the engine
was naive and didn't account for measurements with escape chars. This
uses the correct parsing code to parse and load them correctly.

Fixes #6496
2016-04-30 14:47:19 -06:00
Jason Wilder 4b32760dac Use stdlib func instead of scanning slices 2016-04-20 16:08:58 -06:00
Jason Wilder 49492edd57 Default fields slice size 2016-04-20 16:08:54 -06:00
Jason Wilder 8741159229 Don't allocate a new string when unescaping 2016-04-20 16:00:26 -06:00
Jason Wilder aa842fd38f Return error if creating a point would exceed max key length 2016-03-30 23:57:41 -06:00
Jason Wilder 17c7f4a2a1 Avoid allocating a byte slice 2016-03-29 12:58:52 -06:00
Cory LaNou ba6a95e9bc Merge pull request #5994 from influxdata/single-server-lite
Single Server
2016-03-14 16:11:37 -05:00
Joe LeGasse 24bcf46213 Update number scanning edge cases
This should fix #5965, and other issues that result from submitting
malformed numbers with points
2016-03-14 16:48:39 -04:00
Cory LaNou 27cfaa4b7a in memory meta, single node configs, etc. 2016-03-14 16:55:54 +00: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 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
Joe LeGasse dc8ed7953d Remove custom binary-conversion functions
Also cleaned up some excess allocations, and other cruft from the code
2016-02-18 13:56:35 -05:00
Edd Robinson 88937ab0f7 Fixes #5664 2016-02-17 12:31:07 +11: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
Justin Nuß 80e1cd3410 Lint models package 2016-02-09 08:01:30 +01:00
Edd Robinson 789aff9b23 Fixes #5380 and #5381 2016-01-19 17:10:03 +00:00
Jonathan A. Sternberg 8eac790eab Fix a panic when a tag value was empty
A panic would happen if you wrote the following:
    cpu,host=

There was a missing bounds check when scanning the tag value.

Fixes #5262.
2016-01-16 12:21:32 -05:00
Jason Wilder 59e08606cb Avoid copying slice when escaping/unescaping tags
byte.Replace will return a copy of the input even when nothing has
been replaced.  This is called in lower level query execution and
create some garbage that isn't necessary.
2016-01-06 12:45:29 -07:00
Jonathan A. Sternberg 2994eafc9b Fix scanLine to handle quotes properly
Quotes are handled differently in the line protocol depending on when
they are encountered. Quotes in field values matter, quotes anywhere
else don't.

`scanLine()` didn't understand this difference and treated all quotes
the same as ones for tag values. This resulted in `scanLine()` reading
the wrong amount of data sometimes when quotes were involved.

This fixes #5204.
2015-12-29 14:35:00 -05:00
Jonathan A. Sternberg 4813d82285 Fix the line protocol scanner to read field keys with quotes correctly
Quotes are not supposed to be significant in field keys, but are
significant in field values. The code as it currently was would
consider quotes in a key to be significant, but the later parser that
would unmarshal the fields from the byte string did not consider those
quotes to be significant. This meant that the following string:

    "a=1

The line protocol parser would see a mismatched quote instead of a valid
input to the line protocol. But more nefariously, the following string:

    "a=1"=2

The line protocol parser would ignore the first equals since it is
located in the quotation marks and think this was a valid input. It
would then pass it on to the field parser who would panic and die when
it tried to parse `1"=2` as a number.

Fixes #4076.
2015-12-23 09:14:28 -05:00
Nathaniel Cook eb080785d4 add bounds checking for shard group timestamps
enforce strict valid time ranges on points

small
2015-12-09 13:07:13 -07:00
Jason Wilder 3a8a19a99d Implement LoadMetaDataIndex for tsm1dev engine 2015-12-02 13:38:06 -07:00
Jason Wilder afc0d5bfb9 Add WALSegmentReader/Writer
Basic types for reading and writing WAL segment files.
2015-11-23 13:55:33 -07:00
Edd Robinson 04eea17ac6 Fix golint warnings 2015-11-20 12:19:01 +00:00
Edd Robinson 4b5eb30876 Add extra test cases. 2015-11-20 11:01:23 +00:00
Edd Robinson 7ce385ff18 Improve scanning performance 2015-11-20 01:41:25 +00:00
Edd Robinson bbbb751e0b Fixes #3070 and #4770 2015-11-20 01:26:21 +00:00
Edd Robinson c6536b6769 Add extra test coverage; fix test typo 2015-11-20 01:26:21 +00:00
Edd Robinson 98b8d7d9fa Improve robustness of tests, highlighting #3070 and #4770 2015-11-20 01:26:21 +00:00
CrazyJvm 6e60e3226a check point without fields when NewPoint 2015-11-17 13:21:52 +08:00
Cameron Sparr e2db577e0f Implement a UDP client
closes #4647
2015-11-04 14:18:14 -07:00
oiooj 5d87439eb3 condense skipWhitespace code 2015-10-31 03:21:00 +08:00
Jason Wilder 78086cfa08 Merge pull request #4596 from ch33hau/models_point_skip_empty_string
skip empty string for start position
2015-10-28 19:15:03 -06:00
ch33hau f13af15e71 skip empty string for start position 2015-10-29 02:28:48 +08:00
Jason Wilder 4d24b05ac1 Log WAL points that fail to parse
Mainly for debugging as since this should not happen going forward.  Since
there may be points with NaN already stored in the WAL, this is helpful for
troubleshooting panics.
2015-10-27 17:12:56 -06:00
Jason Wilder 0926b19e6b Prevent creating points with NaN float values
Float values are not supported in the existing engine and the tsm1
engines.  This changes NewPoint to return an error if a field value
contains a NaN field.  It also allows us to validate fields to prevent
other unsupported types from sneaking in through other input plugins.
2015-10-27 17:12:52 -06:00
Jason Wilder c874e48406 Return parse error for NaN float values
Not currently supported.
2015-10-27 16:50:56 -06:00
gunnaraasen 859d2a46e8 Add test for 1- timestamp 2015-10-19 13:06:13 -07:00
gunnaraasen 3244d3f213 Handle negative timestamps 2015-10-19 12:36:28 -07:00
Charles Chan 456a9a8ab7 Fix typos.
* meaining --> meaning
* communcation --> communication
* deterimine --> determine
* mistmatch --> mistmatch
2015-10-17 07:50:45 -07:00
Sean Beckett 82f104a8b1 Merge pull request #4436 from influxdb/tag-names-to-keys
WIP tag name --> tag key, field name --> field key
2015-10-14 16:02:46 -07:00
Ben Johnson f2d23b070b add tsm1 wal quickcheck
This commit adds quickcheck testing for the tsm1 WAL.
2015-10-14 09:38:38 -06:00
Sean Beckett 7151116016 Update points.go 2015-10-13 16:55:20 -07:00
Sean Beckett cbb7e3cbbd Update points_test.go 2015-10-13 16:53:50 -07:00
Sean Beckett 2100c1459c Update points_test.go 2015-10-13 16:46:23 -07:00
Sean Beckett e84a24541f Update points.go 2015-10-13 16:43:59 -07:00
Philip O'Toole ea3ecc733e Remove superfluous blank lines 2015-10-13 14:22:09 -07:00
Philip O'Toole 16580d32a7 Allow uppercase 'e' with scientific notation 2015-10-13 13:30:21 -07:00
Jason Wilder e0ece9f8b5 Fix line protocol accepting tags with no values
If a tag with no value was in the middle of all the tags, it would
get accepted as valid incorrectly.

Fixes #4421
2015-10-13 09:43:13 -06:00
Paul Dix 267f34b94e Updates based on PR feedback 2015-10-05 20:09:56 -04:00
Paris Holley 36898f9451 do not include empty tags in hash 2015-10-05 20:09:56 -04:00
Philip O'Toole 59bbc5c8e3 Reject line protocol that terminates with '-'
Fixes issue #4272.
2015-10-01 20:55:49 -07:00
Cory LaNou ba830be3b9 actually move influxql.Row* -> models.Row* 2015-09-16 16:32:50 -05:00
Cory LaNou d19a510ad2 refactor Points and Rows to dedicated packages 2015-09-16 15:33:08 -05:00