Bjoern Rabenstein
95f392fb2c
Prevent an indexing death spiral.
...
Change-Id: I86b20cd0830d02f87b2f020767257e2d3fb2033c
10 years ago
Bjoern Rabenstein
40354eaa29
Reduce directory depth by one.
...
Change-Id: I7f89df61135ff19169ed97633a662685d414c448
10 years ago
Bjoern Rabenstein
096fa0f8b2
Squash a number of TODOs.
...
- Staleness delta is no a proper function parameter and not replicated
from package ast.
- Named type 'chunks' replaced by explicit '[]chunk' to avoid confusion.
- For the same reason, replaced 'chunkDescs' by '[]*chunkDescs'.
- Verified that math.Modf is not a speed enhancement over conversion
(actually 5x slower).
- Renamed firstTimeField, lastTimeField into chunkFirstTime and
chunkLastTime.
- Verified unpin() is sufficiently goroutine-safe.
- Decided not to update archivedFingerprintToTimeRange upon series
truncation and added a rationale why.
Change-Id: I863b8d785e5ad9f71eb63e229845eacf1bed8534
10 years ago
Bjoern Rabenstein
427c8d53a5
Fix handling of empty chunkDescs while preloading chunks.
...
Change-Id: I73ce89fe0ef90c6eda78218e5be2cbfa0207c364
10 years ago
Bjoern Rabenstein
ecee5d8281
Fix head chunk persisting and a chunkDesc race condition.
...
- Head chunk persisting only happens in evictOlderThan, so do it
there. (With the previous code, it would never happen.)
- Raw accesses to chunkDesc.chunk are now done via isEvicted (with
locking).
Change-Id: I48b07b56dfea4899b50df159b4ea566954396fcd
10 years ago
Bjoern Rabenstein
9c3ecc2134
Remove unused flags.
...
Change-Id: Ie1bcbb0743d65e92072628811706d49753023205
10 years ago
Bjoern Rabenstein
6b37e47f9e
Remove unused metrics.
...
Change-Id: Icf03ba4ce92a5e38daf12930f9661daba79c83bb
10 years ago
Bjoern Rabenstein
2b4ff620aa
Return a nop iterator for series that have been purged completely.
...
Change-Id: I6e92cac4472486feefdecba8593c17867e8c710d
10 years ago
Bjoern Rabenstein
6e3a366f91
Only archive a time series when none of its chunks is pinned.
...
Change-Id: I7e4b67c34b417b8980173bc5dc3b213bd7d698e5
10 years ago
Julius Volz
bfa64248b7
Deal with missing series in preloading.
...
Change-Id: Ibf3a57b329f40a3d5e0b98464a2f45d2f1bd07bf
10 years ago
Bjoern Rabenstein
ca42a22e20
Add safety panic to seriesMap.put.
...
Change-Id: I4d4d2e45cc0f908a33eb1ae6e3ee6796adfcbd1e
10 years ago
Bjoern Rabenstein
83b4fa868d
Fix GetBoundaryValues.
...
Change-Id: I8f8bbdb88e9b24e4c37ff869126ed9343f261ce2
10 years ago
Bjoern Rabenstein
4fc8ad6677
Fix retrieval unit tests.
...
Change-Id: I299b71406b59539230e5182ccc37bc8a83af60b3
10 years ago
Bjoern Rabenstein
b3ed9aa7a2
Clean up start-up and shut-down.
...
Change-Id: Idff4bbb0a15a9f879bfbb3da5b1025179cab5e2c
10 years ago
Bjoern Rabenstein
4447708c9f
Fix a race in target.go.
...
Also, fix problems in shutdown.
Starting serving and shutdown still has to be cleaned up properly.
It's a mess.
Change-Id: I51061db12064e434066446e6fceac32741c4f84c
10 years ago
Bjoern Rabenstein
fd6600850a
Fix race in chunkDesc.
...
Change-Id: Id7bae115d75886e10d44184a690a76777b1531fe
10 years ago
Bjoern Rabenstein
1c53c09558
Treat empty chunkDescs properly in preloadChunksForRange.
...
Change-Id: Ida1bd3fe1f9fb0ea2d5dbb9704be926f0824f873
10 years ago
Bjoern Rabenstein
934d09f738
Fix race during shutdown.
...
Change-Id: I2f8bf48d92a14f1e5ecde27c1b138734d7653394
10 years ago
Bjoern Rabenstein
38fc24d0ed
Fix targetpool_test.go and other tests.
...
Change-Id: I91a4dd1d39e01f174e1aaae653ce1ed7aecaa624
10 years ago
Brian Brazil
fd34e4061d
Add back consoles link.
...
Goes in index.html in consoles or else user data, if present.
Change-Id: I5303d30aa24ca0c20d2e0f49121e04a260b9c4f4
10 years ago
Andres Suarez
e389e63684
Focus expression after selection from dropdown
...
Change-Id: Id7f67e558e3611ab4c7188cc428c342d8d3e67db
10 years ago
Andres Suarez
86a447fc0e
Allow selecting metric from Insert Metric
...
Change-Id: I99e0539cab2749a8aeabc0a13015889ff45834f7
10 years ago
Julius Volz
7f5d3c2c29
Fix and improve the fp locker.
...
Benchmark:
$ go test -bench 'Fingerprint' -test.run 'Fingerprint' -test.cpu=1,2,4
OLD
BenchmarkFingerprintLockerParallel 500000 3618 ns/op
BenchmarkFingerprintLockerParallel-2 100000 12257 ns/op
BenchmarkFingerprintLockerParallel-4 500000 10164 ns/op
BenchmarkFingerprintLockerSerial 10000000 283 ns/op
BenchmarkFingerprintLockerSerial-2 10000000 284 ns/op
BenchmarkFingerprintLockerSerial-4 10000000 288 ns/op
NEW
BenchmarkFingerprintLockerParallel 1000000 1018 ns/op
BenchmarkFingerprintLockerParallel-2 1000000 1164 ns/op
BenchmarkFingerprintLockerParallel-4 2000000 910 ns/op
BenchmarkFingerprintLockerSerial 50000000 56.0 ns/op
BenchmarkFingerprintLockerSerial-2 50000000 47.9 ns/op
BenchmarkFingerprintLockerSerial-4 50000000 54.5 ns/op
Change-Id: I3c65a43822840e7e64c3c3cfe759e1de51272581
10 years ago
Bjoern Rabenstein
7ad55ef83c
Actually close the iterator channels.
...
Change-Id: I6f6a2aef5ff55c6b2d21ad91d02ae6b0ecba4ae8
10 years ago
Bjoern Rabenstein
8fba3302bc
Bold changes to concurrency.
...
(WIP. Probably doesn't work yet.)
Change-Id: Id1537dfcca53831a1d428078a5863ece7bdf4875
10 years ago
Bjoern Rabenstein
fcdf5a8ee7
Fix bugs in chunk evict code.
...
Also, simplify code by re-looking up metric in metric map.
Change-Id: Ib2092f9184374e5a543e87d3a9f4a74fda64b193
10 years ago
Bjoern Rabenstein
7e6a03fbf9
Fix a few concurrency issues before starting to use the new fp locker.
...
Change-Id: I8615e8816e79ef0882e123163ee590c739b79d12
10 years ago
Julius Volz
db92620163
Instrument eviction and purge durations.
...
Change-Id: Ia5b2319363ad2644674c9b7a94162a89bcc296fb
10 years ago
Julius Volz
e0ee7ec7ab
Add fingerprintLocker for locking individual fingerprints.
...
Change-Id: Id41ba555715229edf7d6543f56736b82f6eff1ef
10 years ago
Julius Volz
df1b2a2422
Fix indexing latency instrumentation.
...
Change-Id: I532c170121cd2996d1a378adbb1fd551cd5a4e38
10 years ago
Bjoern Rabenstein
01dd618a20
Fix a locking bug.
...
Change-Id: I183780785991d0b4165ce9186f53eb8201fb3ed5
10 years ago
Julius Volz
358f97791d
Minor cleanups.
...
Change-Id: Ia8685d8439a421fe2143d9ec7120d5bb5ab88d78
10 years ago
Julius Volz
a746fbb8bc
Instrument indexing: queue length, batch sizes and latencies.
...
Change-Id: I60bcbd24b160e47d418a485d8cffa39344a257c6
10 years ago
Bjoern Rabenstein
aea32b0b4b
Avoid redundant fingerprint calculation.
...
Change-Id: Ief8a165dcfa5030226953346ec9dfe4a7787df1f
10 years ago
Bjoern Rabenstein
e9ff29c547
Comment/code cleanup.
...
Change-Id: I38736e3d0fec79759a2bafa35aecf914480ff810
10 years ago
Bjoern Rabenstein
0031a448e2
Add WaitForIndexing.
...
Change-Id: I5a5c975c4246632f937413322c855bbe63d00802
10 years ago
Bjoern Rabenstein
c7aad110fb
Add an indexing queue and batch the ops.
...
Some other improvements on the way, in particular codec -> codable
renaming and addition of LookupSet methods.
Change-Id: I978f8f3f84ca8e4d39a9d9f152ae0ad274bbf4e2
10 years ago
Bjoern Rabenstein
71206dbc06
More code cleanups.
...
Add license text everywhere.
And others....
Change-Id: I11ccde267a2ef7eb366c4788ba7aeae14ba7545c
10 years ago
Julius Volz
f0d5d4bda3
Fix bug around index purging.
...
Change-Id: I8cea00e03f72bbeead2cbd2d26b34d986059ced0
10 years ago
Julius Volz
630b5a087a
Also consider on-disk fingerprints during purge.
...
This reintroduces LevelDB iterators so that we can iterate through all
the on-disk fingerprints.
Change-Id: I007ee4638d038d2a4461bbda27f30fcaad411474
10 years ago
Bjoern Rabenstein
f5f9f3514a
Major code cleanup.
...
- Make it go-vet and golint clean.
- Add comments, TODOs, etc.
Change-Id: If1392d96f3d5b4cdde597b10c8dff1769fcfabe2
10 years ago
Bjoern Rabenstein
3592dc2359
Implement series eviction.
...
Change-Id: I7a503e0ba78aae3761d032851b06f2807122b085
10 years ago
Bjoern Rabenstein
bbf49200ab
Implement methods in persistence.go.
...
Change-Id: I804cdd0b30420e171825fd86fe1281eca0d5e638
10 years ago
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
10 years ago
Bjoern Rabenstein
e7cb9ddb9f
Use a sync.pool for the staging buffer in codec.go.
...
Change-Id: I1aae6847f77b5a7c75582b07c199b1943cf90552
10 years ago
Bjoern Rabenstein
4770cf76a4
Make index package more self-contained.
...
Moved interna from diskPersistence into the indexer.
TotalIndexer now called diskIndexer.
Change-Id: I6c8c62cb171f12bbd8a5474773af7786d71ba388
10 years ago
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
10 years ago
Bjoern Rabenstein
af77d5ef0b
Added a few missing implementations in index.go.
...
Also, added closing of persistence and mem storage.
Change-Id: Iacf0d22c3520dd2584d9546984c1f8a5ed6cd54e
10 years ago
Bjoern Rabenstein
70e4837650
Cut v0.8.0.
...
Change-Id: Ie8d49793e78f10bdeb7ebe19cc2dc729ff7ef590
10 years ago
Bjoern Rabenstein
e0a6cb281e
Fix the accept header.
...
A '/' is a separator and has to be in a quoted string.
Change-Id: If7a3a847f84f8f709074d05dc98b5b21e954030c
10 years ago