0.2.0-beta.1
发布于 变更日志
新增常驻资源租约、显式 Session 准入、两阶段可变分块、SessionGroup 选路与动态内存压力调节。
本版本引入了完整的动态资源调度与状态型多副本能力,涵盖常驻资源租约(ResourceLease)、显式 Session 准入、SessionGroup 缓存足迹路由、两阶段可变大小分块、交互资源预留(interactiveReserve)以及内存压力与自适应扩缩容。
主要变化摘要
- 常驻资源与显式会话准入:新增
resources.acquire({ kind: 'resident', bytes })可调大小租约,以及支持wait / immediate模式的scope.acquireSession()与空闲可回收会话(reclaimable: true)。 - 多副本
SessionGroup与缓存遥测:支持通过CacheResourceLease.report()上报读取器内部块缓存快照与命中率,并在SessionGroup中按真实缓存足迹(Footprint)智能选路。 - 两阶段可变大小分块:新增
createSizedResultSource与iterateSizedResults,先描述块大小上界、再按实际需求预留输出额度并读取数据。 - 交互预留与定向阻塞唤醒:支持为
interactive工作预留专用 Worker、活跃槽位、准备窗口、结果租约与字节预算;调度器对阻塞队列建立资源索引,实现定向唤醒。 - 内存压力与可选自适应控制:支持
resizePool、setMemoryPressure、trim以及池级adaptive控制器,所有缓存缩容均基于 Host ACK 确认后归还额度。
原始记录
以下内容完整保留 tasklane CHANGELOG 中此版本的英文原文,供核对完整技术变更:
- Scoped resident ResourceLease budgets, bounded handle counts and atomic resize.
- Explicit Session admission with immediate/wait modes, cancellation and capacity diagnostics.
- Opt-in idle Session reclamation with graceful disposal and physical capacity retention on failure.
- Multi-key locality hints with bounded, scope-isolated successful-work history.
- Resizable Worker cache resources and large TypedArray resident accounting.
- Two-phase sized result streaming with pre-encoding output admission.
- Explicit transferOwnedBuffers alias, public types and emap migration guidance.
- Joint Worker/resident Session admission, pressure-driven replica reclaim and resize wakeups.
- Failed Worker termination no longer blocks reclamation of healthy idle Workers.
- Zero-copy binary cache view snapshots and cumulative per-pool/global cache counters.
- Sized output metadata is encoded once, with announced and task bounds rechecked before sending.
- Session admission retains ownership through reentrant factory cancellation and synchronous startup failures.
- Session groups route among caller-opened replicas using bounded replacement reader footprints.
- Optional interactive Worker, active/preparing, result-lease and byte reservations.
- Resource-indexed blocked queues with targeted wakeups and eligibility counters.
- Explicit pool resize, pressure/trim and reader trim callbacks with acknowledgement-based accounting.
- Opt-in adaptive Worker/cache targets within hard bounds, with idle hysteresis and pressure suspension.
- Reader cache counters/snapshots and per-pool reclamation attempts, failures and reasons.
- Protocol v6 adds cache control and resource telemetry; update the main package and Worker bundle together.
- Recheck idle replica eligibility after asynchronous cleanup to protect newly admitted work.
- Defer adaptive cache changes on busy Workers and reconcile at idle without blocking other pools.
- Deterministic multi-pool sampling, repeated pressure transitions and three-browser sustained lifecycle coverage.