Fix table.limit / Bad limit on large datasets (0.0.3)#2
Conversation
91a8038 to
4420e08
Compare
|
Updated the build artifacts. Force-pushed Rationale: my initial 0.0.3 was built with Rebuilt with plain |
Server caps a single TableSchemaService.select() at 1.6M rows; the
single-shot ctx.select(names: [.ci,.ri,.y]) in TercenGridService rejected
any plate big enough to exceed that, hitting users with a 400
{error: table.limit, reason: Bad limit} before any data flowed.
Page the main-table select() at 1M rows per call and feed each chunk
straight into dataMap. cselect/rselect untouched (dimension tables are
always small).
Bump version to 0.0.3 and refresh build/web/ (dart2js + canvaskit, no
--wasm — matches what was actually deployed at 0.0.2).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4420e08 to
e40c77a
Compare
|
Rebased onto This is purely about bringing forward Alex's streaming-fetch refactor — the table-limit pagination patch in History on the branch now reads:
|
Building with --wasm produces dart2wasm + skwasm. On the current Flutter SDK that renderer fails to display TIFF-derived PNGs via Image.memory() in the regrid operator — the grid overlay loads but the underlying bitmap shows 'Failed to load image'. Plain 'flutter build web' targets dart2js + canvaskit, which matches what was deployed at 0.0.2 and is confirmed working in prod. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
TableSchemaService.select()at 1,600,000 rows (sci_api_service/lib/src/service/impl/table_schema_service.dart:531). The single-shotctx.select(names: ['.ci','.ri','.y'])inTercenGridService._getTercenDatarejected any plate big enough to exceed that, surfacing as{statusCode: 400, error: table.limit, reason: Bad limit}in the operator UI with the data step hanging on prod.select()at 1M rows per call and feed each chunk directly into the existingdataMap. Removes the now-redundant single-shot parse block.cselect()/rselect()left untouched — dimension tables (number of spots, number of variables) never approach the cap and only the main-table call appears in the failing prod logs.0.0.2 → 0.0.3, refreshedbuild/web/viaflutter build web --wasm, tag0.0.3pushed alongside the branch.How it was found
Investigated a bionavigator data step (
bionavigator.pamgene.com/.../ds/858cdbac-3345-446c-b399-99545cc4410d/wa) that 'never finishes'. Prod logs (tercen-prodnamespace, 2026-05-21) showed repeatedServiceError({statusCode: 400, error: table.limit, reason: Bad limit})fromTableSchemaService.selectmatching the operator's UI error toastminified:hP({statusCode: 400, error: table.limit, reason: Bad limit}).Branching note
Branched off
pamgene/pamsoft_grid_flutter_operatortag0.0.2(the version pinned by Tercen's operator manifest in prod, per theurlsfield inoperator.json).tercen/masterhas divergent history with only0.0.1; this PR brings the fix totercen/so the operator's declared upstream actually carries it.Test plan
flutter analyze lib/implementations/services/tercen_grid_service.dart— 0 errors, 0 warnings; only pre-existingavoid_printlintsflutter build web --wasm— succeeds (47s)0.0.3, re-open Dora's stuck data step, verify regrid loads andRuncompletes🤖 Generated with Claude Code