Bjoern Rabenstein
5a128a04a9
Major reorganization of the storage.
...
Most important, the heads file will now persist all the chunk descs,
too. Implicitly, it will serve as the persisted form of the
fp-to-series map.
Change-Id: Ic867e78f2714d54c3b5733939cc5aef43f7bd08d
2014-11-25 17:02:01 +01:00
Bjoern Rabenstein
e7cb9ddb9f
Use a sync.pool for the staging buffer in codec.go.
...
Change-Id: I1aae6847f77b5a7c75582b07c199b1943cf90552
2014-11-25 17:02:01 +01:00
Bjoern Rabenstein
4770cf76a4
Make index package more self-contained.
...
Moved interna from diskPersistence into the indexer.
TotalIndexer now called diskIndexer.
Change-Id: I6c8c62cb171f12bbd8a5474773af7786d71ba388
2014-11-25 17:02:01 +01:00
Bjoern Rabenstein
89f10e8eb2
Move to using the standard library interfaces for encoding/decoding.
...
BinaryMarshaler instead of encodable.
BinaryUnmarshaler instead of decodable.
Left 'codable' in place for lack of a better word.
Change-Id: I8a104be7d6db916e8dbc47ff95e6ff73b845ac22
2014-11-25 17:02:01 +01:00
Bjoern Rabenstein
af77d5ef0b
Added a few missing implementations in index.go.
...
Also, added closing of persistence and mem storage.
Change-Id: Iacf0d22c3520dd2584d9546984c1f8a5ed6cd54e
2014-11-25 17:02:01 +01:00
Julius Volz
cca7ebe906
Some more cleanups / obsolete code removals.
...
Change-Id: I584144ceeeedafdb114266d8a6d2513e67b1d010
2014-11-25 17:02:00 +01:00
Julius Volz
7e85711df0
Beginnings of a tiered index implementation.
...
This reintroduces a LevelDB-based metrics index.
Change-Id: I4111540301c52255a07b2f570761707a32f72c05
2014-11-25 17:02:00 +01:00
Julius Volz
8dfaa5ecd2
Remove use of freelists for chunk bufs.
...
Change-Id: Ib887fdb61e1d96da0cd32545817b925ba88831c1
2014-11-25 17:02:00 +01:00
Julius Volz
7b35e0f0b8
Use constants from math package instead of literals.
...
Change-Id: I55427ba32c2cbb32ee42ec1e3153160965ab8b3c
2014-11-25 17:02:00 +01:00
Julius Volz
15929eece2
Unpin any already loaded chunks upon preloading error.
...
Change-Id: Ib451136e3ef21bce8b814c21b66eaab727ab341b
2014-11-25 17:02:00 +01:00
Julius Volz
fd01d07589
Check that chunk buffer length fits in 16 bit.
...
Change-Id: Id086a54aa8a1990c1979e747c1c02e53bed6d447
2014-11-25 17:02:00 +01:00
Bjoern Rabenstein
1ca7f24137
Remove float diff tolerance altogether.
...
Change-Id: I9ea9683a4665d5800fca75560bb4b8a8b4406d55
2014-11-25 17:02:00 +01:00
Bjoern Rabenstein
d742edfe0d
Fix precision loss.
...
Large delta values often imply a difference between a large base value
and the large delta value, potentially resulting in small numbers with
a huge precision error. Since large delta values need 8 bytes anyway,
we are not even saving memory.
As a solution, always save the absoluto value rather than a delta once
8 bytes would be needed for the delta. Timestamps are then saved as 8
byte integers, while values are always saved as float64 in that case.
Change-Id: I01100d600515e16df58ce508b50982ffd762cc49
2014-11-25 17:02:00 +01:00
Bjoern Rabenstein
dc2e463a97
Improvements after review.
...
Change-Id: I484359282d4c7113518bbbb131f4f18383c08fdb
2014-11-25 17:02:00 +01:00
Bjoern Rabenstein
52c9dc43a3
Improve testing.
...
In particular, create a fuzz test for time series.
Change-Id: I523a17912405a0b6b46bd395c781d201dfe55036
2014-11-25 17:02:00 +01:00
Julius Volz
3b25867d61
Add chunk persistence tests, fix storage tests.
...
Change-Id: Id0b8f5382e99efa839cc0f826e92bbda985fe9a9
2014-11-25 17:02:00 +01:00
Bjoern Rabenstein
ecdf5ab14f
Index-persistence switched from gob to a hand-coded solution.
...
Change-Id: Ib4ec42535bd08df16d34d4774bb638e35c5a1841
2014-11-25 17:02:00 +01:00
Julius Volz
e7ed39c9a6
Initial experimental snapshot of next-gen storage.
...
Change-Id: Ifb8709960dbedd1d9f5efd88cdd359ee9fa9d26d
2014-11-25 17:02:00 +01:00