influxdb/datastore
John Shahid 1f5f5cb789 Don't write points if they are too old
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
2014-11-03 17:28:47 -05:00
..
storage Use rocksdb 3.5.1 2014-10-10 16:11:17 -04:00
datastore_test.go Restructure the codebase to be more idiomatic 2014-06-30 11:31:08 -04:00
interface.go Restructure the codebase to be more idiomatic 2014-06-30 11:31:08 -04:00
mock_user_test.go Restructure the codebase to be more idiomatic 2014-06-30 11:31:08 -04:00
point_iterator.go Use FINE instead of TRACE when fine logging 2014-10-30 14:16:46 -04:00
point_iterator_stream.go Merge points at the shard level 2014-10-21 17:57:13 -04:00
raw_column_value.go cleanup the storage keys and point iteration in the shard's code 2014-09-10 14:08:07 -04:00
shard.go Return nil when we're supposed to stop processing points. 2014-10-27 17:02:58 -04:00
shard_datastore.go Don't write points if they are too old 2014-11-03 17:28:47 -05:00
shard_datastore_test.go Fix #690. Use idiomatic go project structure 2014-07-14 18:47:37 -04:00
storage_key.go More logging 2014-10-21 17:57:13 -04:00
utils.go cleanup the storage keys and point iteration in the shard's code 2014-09-10 14:08:07 -04:00