8000 Add option for immediate TSDB block reload on new data · Issue #16649 · prometheus/prometheus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add option for immediate TSDB block reload on new data #16649
Open
@HawkingRadiation42

Description

@HawkingRadiation42

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:

  1. Expose an HTTP endpoint such as POST /-/tsdb/reload that calls db.reloadBlocks() without waiting for the next loop tick
  2. 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
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0