If valgrind isn't found, `make valgrind` will be disabled. Otherwise it
will run valgrind to make sure the parser doesn't leak any memory. If
mercurial isn't found an error will be displayed and configure will
abort.
Close#978
Background of the bug: Prior to this patch we actually tried writing
points that were older than the retention period of the shard. This
caused race condition when it came to writing points to a shard that's
being dropped, which will happen frequently if the user is loading old
data (by accident). This is demonstrated in the test in this commit.This
bug was previously addressed in #985. It turns the fix for #985 wasn't
enough. A user reported in #1078 that some shards are left behind and
not deleted.
It turns out that while the shard is being dropped more write
requests could come in and end up on line `cluster/shard.go:195` which
will cause the datastore to create a shard on disk that isn't tracked
anywhere in the metadata. This shard will live forever and never get
deleted. This fix address this issue by not writing old points in, but
there are still some edge cases with the current implementation, at
least not as bad as current master.
Close#1078
The endpoints that were used previously are now deprecated and
removed. This commit uses the query language instead of the endpoint to
provide the same set of features.
fix#1058.
Try to use high resolution timestamp but if it's 0, fall back to
unix timestamp.
Collectd timestamps are uint64 and influxdb uses int64. Change
to use type conversion instead of converting to string and then
parsing the string back to int64. Also, test if the collectd
timestamp is too large for influxdb. If it is, wrap around and
log an error message the first time but don't fill the log with
messages for every entry thereafter.
Move packet parsing code into its own function so it can be unit
tested.
Add unit tests to for packets using high resolution and unix
timestamps.
Fix#1051. Close#1054