Commit Graph

41 Commits (3f34ae69c1bf203657d5b96bc5fb4afbb4ef5809)

Author SHA1 Message Date
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
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
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
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 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
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 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 e84a24541f Update points.go 2015-10-13 16:43:59 -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 d19a510ad2 refactor Points and Rows to dedicated packages 2015-09-16 15:33:08 -05:00