influxdb/storage
Edd Robinson db72f57da4 feat(storage): inject function to control when retention enforcer runs (#15136)
* test(storage): ensure multiple engines can run concurrently

* feat(storage): expose control over retention run

Fixes #15134.

This commit adds the ability to inject a functional option into a
storage.Engine for controlling when the retention enforcer can run.

Previously, retention enforcers ran on an interval; if you ran multiple
storage engines (as we do in some environments) then it was not possible
to coordinate when engines ran retention. Often they would synchronise
because they started at the same time.

This change will let you specify a blocking function to control when the
retention enforcer can run.

A simple function for serialising retention enforcement across multiple
storage engines could look like:

```go
var mu sync.Mutex
func f() (done func()) {
    mu.Lock()
    return func() { mu.Unlock() }
}
```
2019-09-23 08:09:04 -07:00
..
compat Storage engine now validates all tags are utf-8 2019-03-07 09:56:07 +00:00
reads perf(storage): expose ability to peek on stream readers (#14901) 2019-09-04 13:57:36 +00:00
readservice refactor(dependencies): use new dependency injection framework (#15174) 2019-09-19 17:01:17 +02:00
wal refactor(dependencies): use new dependency injection framework (#15174) 2019-09-19 17:01:17 +02:00
Makefile chore(Makefile): add target to check generated files are accurate 2018-12-18 12:54:17 -07:00
bucket_service.go refactor(storage): add deeper tracing around deletes 2019-08-22 11:08:33 +01:00
bucket_service_test.go refactor(storage): add deeper tracing around deletes 2019-08-22 11:08:33 +01:00
config.go Improve bulk series file writes. 2019-04-05 14:38:58 -06:00
engine.go feat(storage): inject function to control when retention enforcer runs (#15136) 2019-09-23 08:09:04 -07:00
engine_schema.go fix(storage): Ensure Tag(Keys|Values) APIs never return (nil, nil) 2019-05-02 09:45:38 -07:00
engine_test.go feat(storage): inject function to control when retention enforcer runs (#15136) 2019-09-23 08:09:04 -07:00
metrics.go chore(storage): bring back storage_retention_checks_total (#14735) 2019-08-22 10:47:27 -07:00
opener.go feat(influxd): Tracing refactor (#12318) 2019-03-04 11:48:11 -08:00
points_writer.go respond to pr comments 2019-08-05 13:16:51 -05:00
points_writer_test.go respond to pr comments 2019-08-05 13:16:51 -05:00
retention.go refactor(storage): add more context to traces and logs 2019-09-19 13:48:06 +01:00
retention_test.go feat(storage): inject function to control when retention enforcer runs (#15136) 2019-09-23 08:09:04 -07:00
series_cursor.go fix(storage): Store.Read behavior changed to return unsorted series keys 2019-04-26 10:38:59 -07:00
series_cursor_test.go feedback: Simplify reader; use constants from influxdb package 2019-02-21 11:18:08 -08:00