Skip to content

Enabling --enable-feature=use-uncached-io on Windows breaks TSDB block writing: “write chunks: direct IO is unsupported” #17190

Description

@shibo911

What did you do?

What did you expect to see?

  • The snapshot to succeed, or if the feature is unsupported on Windows, Prometheus to gracefully ignore the flag or fall back to buffered I/O without failing block writes.

What did you see instead? Under which circumstances?

  • The snapshot failed with an internal error. The API response was: {"status":"error","errorType":"internal","error":"create snapshot: snapshot head block: write chunks: direct IO is unsupported"}
  • This occurs when Prometheus is started on Windows with --enable-feature=use-uncached-io and a block write is attempted (forced by snapshot or when compaction triggers naturally).

System information

OS: Windows (amd64). Example: Windows 10/11 64-bit. uname -srm not applicable on Windows.

Prometheus version

From logs on startup: Starting Prometheus Server mode=server version="(version=3.5.0, branch=HEAD, revision=8be3a9560fbdd18a94dedec4b747c35178177202)" platform=windows/amd64
Typical CLI output: .\prometheus.exe --version prometheus, version 3.5.0 (branch: HEAD, revision: 8be3a9560fbdd18a94dedec4b747c35178177202) go version: go1.24.5 platform: windows/amd64

Prometheus configuration file

Default config scraping itself: global: scrape_interval: 15s scrape_configs:
job_name: "prometheus" static_configs:
targets: ["localhost:9090"]

Alertmanager version

Not applicable.

Alertmanager configuration file

Not applicable.

Logs

Relevant API error when forcing snapshot: {"status":"error","errorType":"internal","error":"create snapshot: snapshot head block: write chunks: direct IO is unsupported"}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions