SegmentedStorePolicy
This content is not available in your language yet.
分层存储策略:冷层编码、热盘保留、上传并发 / 重试预算、载入预取与流变换。
codec?
Section titled “codec?”optional codec?: SegmentCodec;冷层封存段编码;缺省 ‘jsonl+gzip’(zstd 仅 Node ≥ 22.15 可用)
hotRetention?
Section titled “hotRetention?”optional hotRetention?: { keepRecentSegments?: number; maxBytes?: number;};热盘保留:触顶 → store.hot_full 事件 + readiness 红;恒不删未上传段
keepRecentSegments?
Section titled “keepRecentSegments?”optional keepRecentSegments?: number;maxBytes?
Section titled “maxBytes?”optional maxBytes?: number;keyMapper?
Section titled “keyMapper?”optional keyMapper?: (canonicalKey) => string;规范键 → 适配器键(不得破坏唯一性)
canonicalKey
Section titled “canonicalKey”string
string
restore?
Section titled “restore?”optional restore?: { prefetchTailSegments?: number;};载入:缺省只预取 1 个尾段(压缩后通常 = 摘要 + 尾段)
prefetchTailSegments?
Section titled “prefetchTailSegments?”optional prefetchTailSegments?: number;tenant?
Section titled “tenant?”optional tenant?: string;规范键首段;缺省 ‘default’
transform?
Section titled “transform?”optional transform?: StreamTransform;upload?
Section titled “upload?”optional upload?: { concurrency?: number; mode?: "async" | "sync"; retryBudget?: { attempts: number; maxBackoffMs: number; };};上传:缺省 async / 并发 4 / 重试预算 8 次、退避封顶 60 s
concurrency?
Section titled “concurrency?”optional concurrency?: number;optional mode?: "async" | "sync";retryBudget?
Section titled “retryBudget?”optional retryBudget?: { attempts: number; maxBackoffMs: number;};retryBudget.attempts
Section titled “retryBudget.attempts”attempts: number;retryBudget.maxBackoffMs
Section titled “retryBudget.maxBackoffMs”maxBackoffMs: number;Was this page helpful?
Thanks for your feedback.