See the detailed analysis https://docs.google.com/document/d/1efVAMcEw7-R_KatHHcobcFBlNsre-DoThVHI8AO2SDQ/edit?tab=t.0
I ran extensive benchmarks using synthetic data as well as real WAL segments pulled from the prombench runs.
All benchmarks are here https://github.com/prometheus/prometheus/compare/bwplotka/wal-reuse?expand=1
* optimization(tsdb/wlog): reuse Ref* buffers across WAL watchers' reads
Signed-off-by: bwplotka <bwplotka@gmail.com>
* optimization(tsdb/wlog): avoid expensive error wraps
Signed-off-by: bwplotka <bwplotka@gmail.com>
* optimization(tsdb/wlog): reuse array for filtering
Signed-off-by: bwplotka <bwplotka@gmail.com>
* fmt
Signed-off-by: bwplotka <bwplotka@gmail.com>
* lint fix
Signed-off-by: bwplotka <bwplotka@gmail.com>
* tsdb/record: add test for clear() on histograms
Signed-off-by: bwplotka <bwplotka@gmail.com>
* updated WriteTo with what's currently expected
Signed-off-by: bwplotka <bwplotka@gmail.com>
---------
Signed-off-by: bwplotka <bwplotka@gmail.com>
PR #17269 replaced atomic os.Rename-based file writes with
os.WriteFile to fix a Windows flake. However, os.WriteFile is not
atomic (it truncates then writes), and fsnotify can fire between
the truncate and write, causing the watcher to read an empty file
and replace valid targets with empty ones.
Restore atomicity by writing to a temporary file and renaming.
On Windows, retry the rename with a short backoff to handle
transient "Access is denied" errors when the file watcher or
readFile holds an open handle to the destination.
Fixes#18237
Signed-off-by: Munem Hashmi <munem.hashmi@gmail.com>
* Add remyleone as Scaleway maintainer
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
* Add name and email
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
---------
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
* Show the agent db can hold duplicate series by hash
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
* Prevent duplicate SeriesRefs from being lost in db stripeSeries
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
* Drop default initialized value
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
* More comments and only reset deleted if the new segment is larger
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
* Manually manage db/rw to prevent windows test error
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
* Fix incorrect type from rebase
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
* Use Set in GetOrSet to enforce proper lock ordering
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
* Missing period and left over refactor
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
---------
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
The workflow posts commit status updates via the GitHub API, but
the GITHUB_TOKEN only had 'contents: read', causing HTTP 403 on
all statuses API calls.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
When a label-name position is followed by comma or brace-close, only
treat it as a metric name shorthand if the token was a double-quoted
string (tQString). Bare identifiers must be followed by an equal sign.
Add tests for bare identifier inputs that previously could panic.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
getBoundingClientRect() was cached in the setSize hook, which only fires
on chart creation/resize. The cached viewport-relative coordinates became
stale after scrolling, causing the tooltip to appear increasingly offset
on charts further down the page.
Fixed by calling getBoundingClientRect() on every setCursor invocation to
always get accurate viewport-relative coordinates.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
After the migration to native Go fuzzing in PR #17393, this removes
the old dvyukov/go-fuzz based infrastructure. This enables a smooth
transition, because we can merge this pull request when upstream
OSS-Fuzz changes have been done.
This removes:
- promql/fuzz.go and promql/fuzz_test.go (old fuzz functions)
- promql/fuzz-data/ (old corpus files)
The new fuzzing infrastructure is in util/fuzzing/ and is now used
by the CI workflow.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
This adds the `--mantine-ui` switch to `web/ui/build_ui.sh` which
allows to build without the old react UI. If built with only the mantine
ui and started with `--enable-features=old-ui` the user will get a 404
response on th web port.
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
chore(test): make failures in TestRemoteWrite_PerQueueMetricsAfterRelabeling more explicit/rich to help with debugging the test when it flakes for GOARCH=386
Extended Kubernetes SD to support the following pod-based labels:
* `__meta_kubernetes_pod_deployment_name`
* `__meta_kubernetes_pod_cronjob_name`
* `__meta_kubernetes_pod_job_name`
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>