Open
Description
Proposal
Background:
Prometheus’s TSDB detects new blocks in its storage directory on a fixed one minute loop. Users who backfill or drop blocks manually must wait up to one minute before data becomes available. There is no existing mechanism to trigger a block reload on demand or on file system events.
Proposal:
Provide a configuration flag or API endpoint that causes Prometheus to reload TSDB blocks immediately when new data appears. Possible approaches include:
- Expose an HTTP endpoint such as POST /-/tsdb/reload that calls db.reloadBlocks() without waiting for the next loop tick
- Add a flag like --storage.tsdb.reload-on-change which watches for file system events and invokes the reload routine as soon as a new block is detected
- Offer a CLI command or Promtool subcommand to send a reload signal to a running Prometheus instance
Benefits:
Users performing backfills or manual block imports can query data without delay
Example configuration:
#prometheus.yml
storage:
tsdb:
reload_on_change: true