Repository navigation
fix(gantt): a gantt opens on a host with a maximum page size — walk to the row ceiling in steps instead of one 10,001-row read - #36665
Merged
Conversation
…p each row once A full first read is re-walked from the top with id appended to the authored $orderby (last key's direction), and rows are kept once by id, so offset steps over tied sort keys cannot repeat or drop a row on an adapter that does not break ties itself. A set that fits one read is still one read, as authored. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbaTVGEEt267uyT6ufm
Contributor
Author
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Re-run note · 2026-11-23T10:38Z: one re-run of the failed job in run 45157244491.
|
Contributor
Author
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读客户在托管环境里打开甘特图,只看到一行报错:一次要 10001 条数据,超过了托管环境每次最多 5000 条的限制。现在甘特图改成分批读取(每批约 2000 条),最多仍显示 1 万条,超过时照旧提示。日历、地图、树形视图本来就在限制内,没动。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
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.
Requested by Warren · project thread
Fixes #36663
Clause-②: no
Metadata-protocol: none
What changes
ui/packages/plugin-gantt/src/ganttRowWalk.ts(new, not exported from the package index):fetchGanttRowsreads the gantt's filtered result set up toGANTT_ROW_CEILING+ the probe row in steps ofGANTT_FETCH_STEP=nonGridRowCeilingQuery().$top(2,001), the one read the calendar, map, tree and timesheet already send. The first read is the authored query with$top= the step; when it settles the set (short, or an adapter that ignored$top) it is returned as is, envelope included, so a set that fits is still one read with the authored$orderbyuntouched. A FULL first read means more rows exist: the set is then walked from the top under a unique order, the authored$orderbywithidappended as the tie-breaker in the last key's direction (withIdTieBreak;ascwhen nothing was authored), and rows are kept once byid/_id.$skipmoves by the rows that came back; the walk stops at the first short answer or one row past the ceiling and answers{ data, total? }. It stops asking once a newer reload owns the screen.ObjectGantt's reload calls it in place of the singlefindwith...nonGridRowCeilingQuery(GANTT_ROW_CEILING). Everything else in the query ($filter,$orderby,$expand,$search) and the cut (applyNonGridRowCeiling(result, GANTT_ROW_CEILING),NonGridRowCeilingNote) are unchanged.@object-ui/corenon-grid-row-ceiling.ts: docblocks only.GANTT_ROW_CEILINGnow says it is a stop condition, not a request size;nonGridRowCeilingQueryno longer says the gantt passes its ceiling to it.$skip, and can refuse a$topover a maximum page size the way the server does. New block "a host with a maximum page size of 5,000": an empty object draws (one read, no refusal), 6,234 rows all draw with every$topat or under 5,000, and past 10,000 the ceiling and its note still show. Existing$toppins move from 10,001 to the step; the truncation case now pins the walk ($topsums to 10,001, each$skipis the rows before it, each carries$orderby: { id: 'asc' }). NewganttRowWalk.test.ts(7 cases): one read answered as is with the authored order, no read over the step, the tie-break order, a row kept once when an unstable adapter repeats it across a step boundary, and the stop once a newer reload owns the screen.Why
Live hosted customer (HotCRM PSA
crm_project_task, gantt viewproject_plan): the view shows only "Query parameter 'top' asks for 10001 rows; this deployment's maximum page size is 5000. The query was not run." The hosted plane setsOS_DATA_MAX_PAGE_SIZE=5000, andplanQueryReadWindowrefuses anylimitover it before the driver runs, so the refusal depends on the$topasked for, not on the rows held: the maintainer confirmed that tenant's plan has no tasks at all. Every hosted gantt was unusable.Deviation from the card's fix direction, stated: the card proposed one shared walk in
@object-ui/coreused by every non-grid view. Only the gantt asks one read for more than the others: calendar, map, tree and timesheet send 2,001, which the hosted cap accepts. So the walk is private toplugin-ganttand steps at that same 2,001. No new public export (Clause-② no), and the other four views are untouched. A deployment whose cap is below 2,001 still refuses all five views alike; that is a separate question for a follow-up, not this fix.Paging order: the platform's drivers already append the
idtie-breaker to a paged read (driver-query-in-memory.ts"Sort and paging"), but an adapter that does not would let offset steps over tied sort keys (a stage, a date) repeat one row and skip another, the finding raised on the sibling PR #36658. So the multi-step walk sends the unique order itself and dedupes byid. The first full read is re-read under that order rather than reused, which costs one extra read only for sets over 2,001 rows; it keeps every single-read case, and every existing$orderbypin, exactly as authored.Verification
npx vitest run packages/plugin-gantt/ packages/core/src/utils(underui/): 220 files passed, 1 skipped; 3,018 tests passed, 114 skipped (at 14353fe). After the tie-break change,packages/plugin-gantt/: 97 files passed, 1 skipped; 809 tests passed, 114 skipped.pnpm type-checkinui/packages/plugin-gantt: clean.eslinton the touched files: 0 errors (existing warnings only).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbaTVGEEt267uyT6ufm