Commit Graph
65 Commits
Author SHA1 Message Date
Aditya Ujeniya bf65b70c02 modify(metricstore): more verbose logging to DataNonAlignedIssue 2026-07-26 20:33:19 +02:00
Aditya Ujeniya 28bd9cea68 refactor(metricstore): document prune serialization; drop dead GetSelectors leftovers 2026-07-22 13:51:49 +02:00
Aditya Ujeniya 633414d666 feat(metricstore): prune empty node levels in retention free path 2026-07-22 13:24:44 +02:00
Aditya Ujeniya 162e835cf1 feat(metricstore): add exclusion-aware free that prunes empty node levels 2026-07-22 11:18:06 +02:00
Aditya Ujeniya 7b8668b8e4 feat: fill in NaN values when buffers dont contain requested data at the start or end of the buffers 2026-07-20 13:35:31 +02:00
Aditya UjeniyaandClaude Opus 4.8 f83f8afa86 fix(metricstore): make stats read path non-mutating to avoid data race
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>
2026-07-20 11:03:16 +02:00
Aditya Ujeniya e37b2e71a6 feat(metricstore): compute buffer stats eagerly on checkpoint load 2026-07-20 10:49:24 +02:00
Aditya Ujeniya 650db33b22 docs(metricstore): fix misleading comment in stats fast-path test 2026-07-20 10:47:33 +02:00
Aditya UjeniyaandClaude Opus 4.8 9d5268a828 fix(metricstore): guard stats fast path against empty buffer
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>
2026-07-20 10:43:43 +02:00
Aditya UjeniyaandClaude Opus 4.8 9eb6d0e83e feat(metricstore): serve full-buffer stats from cached aggregate
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:30:42 +02:00
Aditya Ujeniya b6a9f7ed3c feat(metricstore): add recomputeStats full-scan helper 2026-07-20 10:26:30 +02:00
Aditya Ujeniya 5ff376c742 style(metricstore): gofmt stats_test comment alignment 2026-07-20 10:25:16 +02:00
Aditya Ujeniya 931a2a6e79 feat(metricstore): maintain running buffer stats on write 2026-07-20 10:22:16 +02:00
Aditya UjeniyaandClaude Opus 4.8 aa61ccb88b feat(metricstore): add running-stat fields to buffer
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:17:12 +02:00
Aditya Ujeniya c509a0104b change resampling policy points 2026-07-20 09:43:18 +02:00
Aditya Ujeniya 662e86b45d chore: ignore local agent and docs working directories 2026-07-08 15:45:24 +02:00
Aditya UjeniyaandClaude Fable 5 94799aca36 fix: drop unconditional force-free of buffers retained for running jobs
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>
2026-07-08 15:45:24 +02:00
Aditya UjeniyaandClaude Fable 5 dd2f5968b1 feat: pass NodeProvider to metricstore Init
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>
2026-07-08 15:44:54 +02:00
Aditya UjeniyaandClaude Fable 5 ea2bfbb6aa fix: wire NodeProvider into CLI checkpoint cleanup path
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>
2026-07-08 14:31:26 +02:00
Aditya Ujeniya 33a1bd3529 fix: set NodeProvider before metricstore Init so checkpoint load sees it 2026-07-08 14:18:03 +02:00
Aditya Ujeniya 58c71da0b8 feat: skip checkpoint cleanup for nodes with running jobs 2026-07-08 14:13:15 +02:00
Aditya Ujeniya 1e416a6dd0 feat: load full checkpoint history for nodes with running jobs 2026-07-08 14:05:56 +02:00
Aditya UjeniyaandClaude Fable 5 97ab828d60 feat: add isNodeUsed helper for NodeProvider lookups
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 14:01:37 +02:00
Aditya Ujeniya 71fc9efec7 Add binaryCheckpointReader as utility tool 2026-03-26 17:21:23 +01:00
Aditya Ujeniya 6e97ac8b28 Verbose logs for DataDoesNotAlign error in CCMS 2026-03-26 14:13:12 +01:00
Aditya Ujeniya 74ab51f409 Patch bufferPool with no limits to pool size 2026-03-03 09:51:04 +01:00
Aditya Ujeniya a243e17499 Update to shutdown worker for WAL checkpointing mode 2026-03-02 15:27:06 +01:00
Aditya Ujeniya 2e5d85c223 Udpate testcase 2026-02-27 15:09:06 +01:00
Aditya Ujeniya 07b989cb81 Add new bufferPool implementation 2026-02-27 14:44:32 +01:00
Aditya Ujeniya 1cf2c41bd7 Resize the buffers and put them into the pool 2026-02-16 18:21:45 +01:00
Aditya Ujeniya 2eeefc2720 Add healthCheck support for external CCMS 2026-02-16 16:57:17 +01:00
Aditya Ujeniya 1145b31a49 Updated dataGenerator.sh script 2026-02-06 18:07:32 +01:00
Aditya Ujeniya fcb37b0367 Update to count healthy metrics 2026-02-06 08:45:36 +01:00
Aditya Ujeniya 39b8356683 Optimized CCMS healthcheck 2026-02-04 10:24:45 +01:00
Aditya Ujeniya 3cf88f757c Update to checkpoint loader in CCMS 2026-02-03 16:25:48 +01:00
Aditya Ujeniya a71341064e Update to MetricStore HealthCheck API 2026-01-30 23:24:16 +01:00
Aditya Ujeniya 7101d2bb3b Handle the metric/host not found case differently 2026-01-28 17:47:38 +01:00
Aditya Ujeniya cd810b45ec Adding dataGenerator script 2026-01-23 16:51:17 +01:00
Aditya Ujeniya 77a2a256e4 Update to MemoryUsage worker 2026-01-16 17:01:39 +01:00
Aditya Ujeniya 1a41629535 Refactor Archive to Cleanup and rename everything 2026-01-16 14:09:50 +01:00
Aditya Ujeniya 32319adf72 Add Memory Tracker worker for CCMS 2026-01-15 21:29:21 +01:00
Aditya Ujeniya 10a5c89a16 Fix logic for findFiles() and keep archive worker 2026-01-15 20:27:11 +01:00
Aditya Ujeniya 7cd98c4f25 Test and update files for dynamic retention 2026-01-15 17:48:59 +01:00
Aditya Ujeniya 3276ed7785 Half-baked commit for new dynamic retention logic 2026-01-14 14:56:36 +01:00
Aditya Ujeniya 32e5353847 Fix to NATS deadlock and revert demo script 2025-12-17 18:14:36 +01:00
Aditya Ujeniya d2f2d78954 Changing JWT output to stdout and change to help text 2025-12-17 15:58:42 +01:00
Aditya Ujeniya fed62b6c45 Functionality to configure resampling 2025-12-12 14:51:01 +01:00
Aditya Ujeniya 3c1a7e0171 Fixed the behavior of avro write to old files 2025-10-28 09:42:28 +01:00
Aditya Ujeniya 2287586700 Revert avro files writing logic 2025-10-28 08:53:43 +01:00
Aditya Ujeniya ea7660ddb3 Revert "Fix wrong memorystore nats schema"
This reverts commit 856ccbb969.
2025-10-28 08:50:33 +01:00
Aditya Ujeniya 44e98e8f2f Fix to avro reader 2025-10-27 20:44:40 +01:00
Aditya Ujeniya 0920286b4c Clean up 2025-10-23 17:58:56 +02:00
Aditya Ujeniya f34e10cfd9 Schema for metric store 2025-10-23 17:58:17 +02:00
Aditya Ujeniya b2368a0751 Connectivity to CCMS feature readded 2025-09-10 14:23:18 +02:00
Aditya Ujeniya 9b644119ae Fix to testdata database 2025-09-09 18:34:10 +02:00
Aditya Ujeniya 3b9d05cc6d Fix exclusive to shared in svlete and graphql 2025-09-09 14:57:05 +02:00
Aditya Ujeniya af43901ca3 Trial and Test MetricStore components 2025-09-08 22:54:13 +02:00
Aditya Ujeniya 62565b9ae2 Combined metricstore api and functions 2025-09-08 11:29:27 +02:00
Aditya Ujeniya bca176170c Migration SQL fix 2025-09-03 08:22:15 +02:00
Aditya Ujeniya 85dc0362c1 fix: SimpleResampler fixed 2024-12-04 17:54:54 +01:00
Aditya Ujeniya 3b769c3059 fix: Update to resampler handling different resolutions 2024-12-04 14:19:56 +01:00
Aditya Ujeniya f1893c596e Versioning to query endpoint 2024-09-17 14:36:42 +02:00
Aditya Ujeniya 838ebb3f69 Updates res 2024-09-01 22:54:43 +02:00
Aditya Ujeniya 036eba68e1 Fix for resampler 2024-08-25 16:13:43 +02:00
Aditya Ujeniya ceb3a095d8 Sampling Feature for archived and fresh data 2024-08-22 14:29:51 +02:00