Repository navigation
Replies: 1 comment
|
Update (rc.7 / rc.8 status) Thanks — the pagination crash fix (PR #1371, However, the original issue remains: history pages are still bounded only by message count ( Suggested follow-up: cap each page by event count in 中文摘要:官方已在 rc.7 修复大日志分页的栈溢出崩溃(PR #1371),但分页仍只按消息数截断(rc.7/rc.8 仍是 maxMessages: 50),超大会话单页仍可达约 6.5 万事件 / 13MB,Web 端 30 秒超时中止、会话依旧打不开。建议在 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
session.historypages are bounded by message count only (maxMessages), so asession with streamed, chunk-heavy turns produces a single page large enough to
make the Web client abort the request and fail to open the session.
Reproduction
历史加载失败:The user aborted a request.(internal)maxMessages: 50,packages/client/runtime/src/client/sessions/session.tsPAGE_MESSAGES = 50) resolves to 65,878 events / ~12.9 MB of JSON.(
DEFAULT_TIMEOUT_MS = 30_000inpackages/client/connection/...) aborts the fetch(or the tab freezes parsing/rendering tens of thousands of events), and the session
cannot be opened.
Proposed fix (server-side, transparent to clients)
Cap each history page by event count in addition to message count, in
packages/host/apiproxy/src/api-proxy.tspaginate(). The cut must stay on amessage boundary (the existing
groupStartrule), so pages remain contiguousranges and the client's existing paging (
loadOlder,hasMore) works unchanged.In
paginate():Notes
hasMore/beforeSeqsemantics are unchanged; only the page size shrinks forpathological sessions. Normal sessions still page by 50 messages.
symptom, not the cause.
packages/host/apiproxy/tests/api-proxy-cold.spec.tsor a newpaginate spec): a session whose last few messages span > MAX_PAGE_EVENTS chunk events
must return
hasMore: trueand a page ≤ cap + one message, with cuts on message groups.maxMessages: 50 → 8and the unary timeout30s → 120s.中文摘要:历史分页只按"消息数"截断,流式会话一条消息可能含上万条 chunk 事件,
默认 50 条消息的一页实测达 65,878 个事件 / 约 13MB,浏览器客户端请求被超时中止
(报
The user aborted a request),会话打不开。建议在服务端paginate()增加单页事件数上限(如 20,000),截断点仍落在消息边界,客户端分页逻辑无需改动。
All reactions