prometheus/storage/metric
Julius Volz fd2158e746 Store copy of metric during fingerprint caching
Problem description:
====================
If a rule evaluation referencing a metric/timeseries M happens at a time
when M doesn't have a memory timeseries yet, looking up the fingerprint
for M (via TieredStorage.GetMetricForFingerprint()) will create a new
Metric object for M which gets both: a) attached to a new empty memory
timeseries (so we don't have to ask disk for the Metric's fingerprint
next time), and b) returned to the rule evaluation layer. However, the
rule evaluation layer replaces the name label (and possibly other
labels) of the metric with the name of the recorded rule.  Since both
the rule evaluator and the memory storage share a reference to the same
Metric object, the original memory timeseries will now also be
incorrectly renamed.

Fix:
====
Instead of storing a reference to a shared metric object, take a copy of
the object when creating an empty memory timeseries for caching
purposes.

Change-Id: I9f2172696c16c10b377e6708553a46ef29390f1e
2014-02-02 17:11:08 +01:00
..
.gitignore Spin up curator run in the tests. 2013-04-05 13:55:11 +02:00
compaction_regression_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
curator.go Fix OperatorError. 2014-01-21 16:49:51 +01:00
dto.go WIP - Snapshot of Moving to Client Model. 2013-06-25 15:52:42 +02:00
end_to_end_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
freelist.go Update low-level i'faces to reflect wireformats. 2013-09-04 17:13:58 +02:00
helpers_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
index.go Include forgotten imports. 2013-08-14 18:52:55 +02:00
instrumentation.go rename curation metrics to prometheus_curation 2013-12-13 17:45:01 -05:00
interface.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
interface_test.go Use LRU cache to avoid querying stale series. 2013-06-06 23:56:19 +02:00
labelpair.go WIP - Snapshot of Moving to Client Model. 2013-06-25 15:52:42 +02:00
labelpair_test.go WIP - Snapshot of Moving to Client Model. 2013-06-25 15:52:42 +02:00
leveldb.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
memory.go Store copy of metric during fingerprint caching 2014-02-02 17:11:08 +01:00
memory_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
objective.go Update low-level i'faces to reflect wireformats. 2013-09-04 17:13:58 +02:00
operation.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
operation_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
processor.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
processor_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
regressions_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
rule_integration_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
sample.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
samplekey.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
scanjob.go WIP - Snapshot of Moving to Client Model. 2013-06-25 15:52:42 +02:00
stochastic_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
tiered.go Added telemetry for counting stored samples 2013-12-12 10:06:41 -05:00
tiered_test.go Store copy of metric during fingerprint caching 2014-02-02 17:11:08 +01:00
view.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
view_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
watermark.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00