prometheus/storage/metric
Julius Volz ce1ee444f1 Synchronous memory appends and more fine-grained storage locks.
This does two things:

1) Make TieredStorage.AppendSamples() write directly to memory instead of
   buffering to a channel first. This is needed in cases where a rule might
   immediately need the data generated by a previous rule.

2) Replace the single storage mutex by two new ones:
   - memoryMutex - needs to be locked at any time that two concurrent
                   goroutines could be accessing (via read or write) the
                   TieredStorage memoryArena.
   - memoryDeleteMutex - used to prevent any deletion of samples from
                         memoryArena as long as renderView is running and
                         assembling data from it.
   The LevelDB disk storage does not need to be protected by a mutex when
   rendering a view since renderView works off a LevelDB snapshot.

The rationale against adding memoryMutex directly to the memory storage: taking
a mutex does come with a small inherent time cost, and taking it is only
required in few places. In fact, no locking is required for the memory storage
instance which is part of a view (and not the TieredStorage).
2013-05-10 17:15:52 +02:00
..
.gitignore Spin up curator run in the tests. 2013-04-05 13:55:11 +02:00
curator.go Schedule the background compactors to run. 2013-05-07 17:14:04 +02:00
end_to_end_test.go Make view use memory persistence, remove obsolete code. 2013-04-18 22:26:29 +02:00
frontier.go Implement batch database sample curator. 2013-04-27 17:38:18 +02:00
instrumentation.go Schedule the background compactors to run. 2013-05-07 17:14:04 +02:00
interface.go Synchronous memory appends and more fine-grained storage locks. 2013-05-10 17:15:52 +02:00
interface_test.go Checkpoint. 2013-03-21 18:06:51 +01:00
leveldb.go Fix goroutine leak in leveldb.AppendSamples 2013-05-03 12:13:05 +02:00
memory.go Integrate memory and disk layers in view rendering. 2013-04-19 16:01:27 +02:00
operation.go Slice expression simplifications. 2013-05-07 13:22:29 +02:00
operation_test.go Integrate memory and disk layers in view rendering. 2013-04-19 16:01:27 +02:00
processor.go Include deletion processor for long-tail values. 2013-05-10 12:19:12 +02:00
processor_test.go Include deletion processor for long-tail values. 2013-05-10 12:19:12 +02:00
regressions_test.go Constantize metric name label name. 2013-03-26 16:20:23 +01:00
rule_integration_test.go Convert trailing float64s. 2013-04-21 20:52:21 +02:00
scanjob.go Checkpoint. 2013-03-21 18:06:51 +01:00
stochastic_test.go Publicize a few storage components for curation. 2013-05-02 13:16:04 +02:00
test_helper.go Synchronous memory appends and more fine-grained storage locks. 2013-05-10 17:15:52 +02:00
tiered.go Synchronous memory appends and more fine-grained storage locks. 2013-05-10 17:15:52 +02:00
tiered_test.go Synchronous memory appends and more fine-grained storage locks. 2013-05-10 17:15:52 +02:00
view.go Make view use memory persistence, remove obsolete code. 2013-04-18 22:26:29 +02:00
view_test.go Make view use memory persistence, remove obsolete code. 2013-04-18 22:26:29 +02:00