Metric store tickets - #569
Open
adityauj wants to merge 32 commits into
Open
Conversation
Fixes #526 Entire-Checkpoint: 893a1de325b5
Entire-Checkpoint: f69e38210bb1
Entire-Checkpoint: 7536f551d548
A setting nested at the wrong level (e.g. "resampling" placed next to "main" instead of inside it) was silently ignored. Emit a startup warning for any top-level config section not consumed by the backend so such misconfigurations surface instead of failing silently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 69d1b85c8db3
The backend resample config changed from {trigger, resolutions[]} to a
policy/targetPoints model, but several components still spread
resampleConfig.resolutions, throwing "resolutions is not iterable" and
breaking the job list render. Default the initial resolution to null (the
backend resolves it from the configured policy; zoom overrides it) and
drop the now-obsolete resolution selector and admin display fields.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 27516ce259fd
Bump gqlgen, aws-sdk-go-v2, go-oidc, go-sqlite3, gqlparser, go-openapi, golang.org/x/* and other transitive dependencies to their latest patch and minor releases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 964ca6774882
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The -cleanup-checkpoints CLI flag called CleanupCheckpoints without initializing the MemoryStore singleton or setting its NodeProvider, so it silently fell back to legacy clean-everything behavior and could delete checkpoints for hosts with running jobs. Inject the job repository as NodeProvider the same way runServer does, so the CLI path also skips used hosts. Also update SetNodeProvider's doc comment, which only mentioned Free but is now also consulted by FromCheckpoint and CleanupCheckpoints. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Setting the provider after Init left the checkpoint restore inside Init without job information and forced callers to pre-call InitMetrics and SetNodeProvider in the right order. Init now receives the provider as a parameter and injects it before the restore, so the ordering is enforced by the signature. SetNodeProvider remains for callers that do not run Init (tests, -cleanup-checkpoints). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MemoryUsageTracker freed all buffers older than the retention cutoff on every tick whenever the last retention pass had excluded used nodes, regardless of memory pressure — discarding the history kept in memory for long-running jobs. Buffers are now only reclaimed by the existing emergency path once memory usage exceeds the configured cap. The now-unused selectorsExcluded state is removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add len(b.data) > 0 guard to prevent infinite loop when an empty linked buffer is reachable. With the guard false, the normal path handles empty buffers safely via the existing t < b.start || idx >= len(b.data) check. Add regression test TestStatsFastPathThenPartialTail to pin the boundary: three-buffer chain where earlier buffers are fully covered (fast path) and the last buffer is partially covered (normal path). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
recomputeStats() wrote statSum/statSamples/statMin/statMax/statsValid from inside the stats() fast path, which runs under only a shared RLock via MemoryStore.Stats -> Level.findBuffers. Two concurrent queries on the same invalid buffer could both enter the fast path and race on those fields. Require statsValid in the fast-path guard instead of recomputing inline; invalid buffers now fall through to the existing point-by-point scan, which only reads b.data. recomputeStats() is unchanged and still used by checkpoint loadFile at single-threaded load time. Updated stats_test.go: overwritten buffers now stay statsValid=false after a query (documenting non-mutating reads); TestStatsMultiBufferChain and TestStatsFastPathThenPartialTail now recompute stats after building bare buffers so the fast-path cache fold is still covered; added TestStatsConcurrentQueriesNoRace (race-clean under -race for both valid and post-overwrite buffers) and TestStatsGappedChain (real inter-buffer gap correctly excluded from Samples/Min/Max/Avg). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…the start or end of the buffers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolving metric store tickets: