Mooncake/scripts
Cruz Zhao d00afc7fb4
[Store] Introduce cached batch query result (#1834)
* [Store] preserve cached-query semantics across shm reads

Keep query-result caches request-scoped while carrying lease/error semantics through DummyClient shm reads, and trim redundant cache copies in unified and Engram read paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] simplify cached-query reuse path

Keep cached-query reuse focused on preserving QueryResult and collapse duplicated batch-read plumbing so unified and Engram paths share the same minimal execution flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] trim cached-query plumbing

Keep cached-query reuse focused on request-scoped QueryResult flow, drop the extra metadata-prefix helper surface, preserve cached failures across SHM reads, and narrow reconstruction plans to carry only the query results they actually execute.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] tighten cached-query scope

Restore RealClient's private ranged-read metadata flow and keep the cached-query change focused on request-scoped QueryResult reuse instead of broader batch-read refactors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] restore ranged-read layout comments

Move the ranged-read helpers back to their prior locations and restore the LOCAL_DISK/DISK execution comments so the cached-query diff stays readable and close to the original structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] restore header declaration layout

Move the ranged-read declarations back next to the surrounding internal read helpers so the cached-query change stays scoped and easier to review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] reuse cached queries across reconstruction reads

Reuse query results for reconstruction metadata and execution so unified parallel reads and Engram avoid duplicate BatchQuery work, and centralize cached-query conversion helpers in the shared client layer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] reduce test_44 same-key contention

Use unique keys in the unified parallelism concurrency matrix test so 8-core runners still exercise concurrent relation coverage without piling repeated writes onto the same objects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] harden reconstruction query reuse

Avoid serializing reconstruction metadata reads on shared scratch state and only reuse cached query results when they are still valid, so fallback metadata loads do not keep stale or failed routing alive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] add formula full reconstruction into path

Use a formula plan for regular full reconstruction reads to reduce cold planning overhead while preserving generic fallback behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] address formula reconstruction review feedback

Tighten the formula reconstruction path and related query reuse changes by validating shard metadata, avoiding hot-path casts, preserving failed cached query results, and removing legacy comparison hooks from tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Store] fix rebased full reconstruction build

Remove a duplicate writable buffer region declaration left by conflict resolution so the Python store extension builds after rebasing onto main.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 10:15:31 +08:00
..
ascend [CI] Add release-npu workflow for Ascend NPU release (#2178) 2026-05-22 15:31:07 +08:00
management [CLI] add script for metadata management (#1746) 2026-03-26 13:18:19 +08:00
tone_tests [Store] Add lock-free MmapArena allocator for buffer mmap path (#1820) 2026-05-03 14:18:18 +08:00
bench_engram_store_27b.py [engram] support engram (#1483) 2026-05-08 19:52:35 +08:00
build_wheel.sh [build] NPU wheel: RPATH patching, vendored lib consolidation, pip retry, cmake fixes (#2216) 2026-06-09 10:10:26 +08:00
check_hicache_hugepage_requirements.py [Store] Add lock-free MmapArena allocator for buffer mmap path (#1820) 2026-05-03 14:18:18 +08:00
code_format.sh [Misc] Fix silent failure in `code_format.sh` when clang-format is missing (#1824) 2026-04-06 12:19:26 +08:00
generate_cluster_topology.py [TE] Add TENT codebase to main (Phase 1: structural import) (#1213) 2025-12-22 19:22:13 +08:00
run_tests.sh [Store] L2->L1 promotion-on-hit (#2071) 2026-05-21 15:55:50 +08:00
test_async_store.py [store] add async api (#1265) 2025-12-25 16:46:14 +08:00
test_copy_move_api.py [Store][Feature] copy and move client support (#1364) 2026-02-06 19:02:02 +08:00
test_drain_http_api.py feat(store): expose drain job control via master HTTP API (#1815) 2026-04-09 14:33:45 +08:00
test_engram_store.py [engram] support engram (#1483) 2026-05-08 19:52:35 +08:00
test_hicache_hugepage_requirements.py [Store] Add lock-free MmapArena allocator for buffer mmap path (#1820) 2026-05-03 14:18:18 +08:00
test_installation.sh [CI] pin torch version to 2.11.0 (#2105) 2026-05-15 17:36:46 +08:00
test_tensor_api.py [Store] Introduce cached batch query result (#1834) 2026-06-10 10:15:31 +08:00
test_upsert_api.py [Store] Unified parallel tensor IO (#1389) 2026-04-27 23:39:40 +08:00