Repository navigation
feat(cache): Warmup Parallel Bulk Load + audit gap fixes (v1.8.0, Issue #244) - #4250
Merged
Merged
Conversation
- Add `max_parallel_workers` to `AdaptiveQueryCache::Config` (default: `std::thread::hardware_concurrency()`, min 1) - Add `warmup_duration_ms` and `warmup_entries_per_second` to `WarmupResult` - Rewrite `warmupFromLog` to read all lines first, then dispatch N `std::async` workers (one per CPU core), each processing an independent chunk of the NDJSON log with per-shard L1/L2 insertion under existing mutexes; aggregate counters are `std::atomic` - Update `handleWarmup` API response to include timing and throughput - Add four new tests: default max_parallel_workers, timing/throughput fields, parallel correctness, and single-worker parity - Mark FUTURE_ENHANCEMENTS.md items complete ([x])" Co-authored-by: makr-code <[email protected]>
- Rename `eps` → `entries_per_second` for clarity - Use microsecond-resolution timer; return 0.0 throughput when duration is zero - Add thread-safety note for `enhanced_metrics_` atomic fields in worker comment - Document approximate max_entries behaviour with parallel workers - Add clarifying comment for `value_json` naming - Add brief comment explaining the test's 64-byte filler size" Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
[WIP] Implement warmup for parallel bulk load in cache domain
feat(cache): Warmup Parallel Bulk Load (v1.8.0)
Mar 15, 2026
- Add CI workflow cache-warmup-parallel-bulk-load-ci.yml that builds and runs CacheWarmupTests on Ubuntu 22.04/gcc-12 and 24.04/gcc-14 - Update src/cache/ROADMAP.md: add parallel bulk load entry in Completed (Follow-up) section with full implementation details - Update artifacts/roadmap-issues/bodies/0244: mark all Acceptance Criteria and Implementation Notes checkboxes [x] - Add BM_WarmupFromLog benchmark to bench_adaptive_query_cache.cpp: measures throughput for 10K/100K entries with 1/2/4 workers; uses error_code for filesystem::remove; SetItemsProcessed outside loop - Update FUTURE_ENHANCEMENTS.md: bump version to v1.8.0, date to 2026-03-15" Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
feat(cache): Warmup Parallel Bulk Load (v1.8.0)
feat(cache): Warmup Parallel Bulk Load + audit gap fixes (v1.8.0, Issue #244)
Mar 15, 2026
makr-code
marked this pull request as ready for review
March 15, 2026 12:11
6 of 16 tasks
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.
Implements parallel bulk warmup for
warmupFromLog(Issue #244) and closes all audit gaps found during code review.Description
Core feature — parallel warmup (
src/cache/warmup.cpp)Nequal chunks, dispatchesNstd::async(launch::async)workers concurrentlyl1_mutex_/l2_mutex_; aggregate counters (total_loaded,l1_warmed) arestd::atomic<size_t>;enhanced_metrics_.*arestd::atomic<uint64_t>— no extra locks needednum_workers == 1or log is emptyConfig & result API
POST /v1/admin/cache/warmupresponse now includeswarmup_duration_msandwarmup_entries_per_second.max_entriescap semanticsApproximate with multiple workers (off by at most
num_workers − 1); intentional — CAS overhead not worth it for a bulk startup operation.Audit gap fixes
cache-warmup-parallel-bulk-load-ci.yml— buildstest_cache_warmupand runsCacheWarmupTestson Ubuntu 22.04/gcc-12 and 24.04/gcc-140244-cache-warmup-parallel-bulk-load.md: all acceptance criteria and implementation notes marked[x]BM_WarmupFromLogadded tobench_adaptive_query_cache.cpp— 10K/100K entries × 1/2/4 workers, reports items/s against the ≥ 500 K entries/s targetFUTURE_ENHANCEMENTS.md: bumped tov1.8.0, date updatedType of Change
Testing
4 new tests in
test_cache_warmup.cpp:Config_MaxParallelWorkers_DefaultIsHardwareConcurrencyWarmupFromLog_ReportsDurationAndThroughputWarmupFromLog_ParallelWorkers_CorrectResultsWarmupFromLog_SingleWorker_SameAsDefault📚 Research & Knowledge (wenn applicable)
/docs/research/angelegt?/docs/research/implementation_influence/eingetragen?Relevante Quellen:
Checklist
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.