Repository navigation
Conversation
…one (ITL-1464) A SpiralDBTableSource read whose table holds no source-info column and no content hash built one token per row and data column, then dropped them. On 2.2 million rows of 13 columns that was 9.3 GiB of Arrow memory for a 282 MiB table. The read now builds them only when its result shows or hashes them. Adds the memory diagnosis (docs/dev/specs/itl-1464-memory-diagnosis.md) and the scripts it was measured with. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…L-1464) An async job kept every row three times as (Tag, Data) pairs: in the orchestrator's result collectors (never read by a job), in each operator job node's output list, and in each barrier operator's gathered input, plus the pairs an ArrowTableStream caches while a barrier sends its result. Rows are now kept as Arrow tables of at most 8,192 rows (RowChunks), which build exactly the table the row list built. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
…TL-1464) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…464 material Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…464 material Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…o eywalker/itl-1464-async-transport
…lts says (ITL-1464) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…hunk's error to the read (ITL-1464) Review of PR 562: rows_once took the unkept path for any ArrowTableStream subclass or shadowed iter_data, and a full chunk that cannot make one table raised while a barrier was still collecting, leaving the other input's reader behind and raising where main returned no rows for an empty other input. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This was referenced Nov 25, 2026
…leaves no reader behind (ITL-1464) Review of PR 562, round 2: a chunk that failed part way was built again and its rows given twice; the first row's keys were read as it arrived; after a failed chunk the pairs accumulated; a failing barrier left its sibling's reader alive. A failure is now permanent, a want of memory ends the run at once, a row is read only when its chunk is built, and the barriers end every reader on any error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-triggers-computation-without
…ements (ITL-1464) The design states that the cache root must be on disk, bounds the pairs of one join match, qualifies the SQLite primary-key trust, counts small results kept in memory and narrows the preview's side-effect promise. The measurement steps each use their own emptied result location, and setup runs under the memory guard. One test runs an operator over the source in a job, sync and async, in two tag orders. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The design names how a database-backed node read keeps the emitted order, runs a PolarsFilter per batch only for a predicate known to be row-wise, corrects the 1:1 join bound for inputs that share no key and fixes the arrival order of the bound's tests. The job test over the source covers the named columns as data, data-tags and tags, two table layouts and row multiplicity on the async path; the measurement scripts get docstrings. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…omputation-without' into eywalker/itl-1464-async-transport
…-triggers-computation-without
A node's reference names the stored row the run emitted (base entry id and recomputation index), the stated bound excludes steps that need their whole input, and async results are compared with sync row for row with multiplicity. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…omputation-without' into eywalker/itl-1464-async-transport
The cache is read only from closed segments and waiting rows, a preview continues one open read, the join index counts its per-key counts, and a whole-input step counts its output and conversion buffers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…omputation-without' into eywalker/itl-1464-async-transport
…ITL-1464) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…omputation-without' into eywalker/itl-1464-async-transport
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.
Draft, for ITL-1464: the first transport step. Stacked on #558 (its commits are included here until it merges).
What this does
On the async path every row was kept as a
(Tag, Data)pair of objects (18 to 110 KiB per row against a few KiB as Arrow data), in four places. Each now keeps Arrow tables of at most 8,192 rows, or nothing:job.run()discardsmaterialize_results=Falseto the async orchestrator)collect()into a list nobody readsOperatorNode.async_execute, the node's kept outputRowChunksPolarsFilter,GroupBy,TagBy,MergeJoin,Rejoin,Batchwithout a size)channel.collect()collect_row_chunksArrowTableStream.iter_datakeeps every pairrows_once(iter_data_unkept)RowChunks.row_table()equals_rows_to_table(rows)(columns, types, field flags, values; only the arrays' chunking differs), so every stream, hash and stored row is the one built before. No hash, identity, stored layout or golden value moves; no public promise changes (a job'smaterialize_resultsnever affected what a job returns or keeps).Measured (async job, synthetic 13-column table, peak resident memory less the import, per row)
map_datadrop_nullspolars_filterjoin(large with small)group_bydrop_nulls,group_by,map_data, function podBefore: 20,000 rows (the chain also at 200,000); after: 200,000 rows. What remains is the tokenized Arrow table each node keeps (about 4.5 KiB per row per kept copy) and
Join's row-form buffers: the next steps.The chunk, as a contract for the next steps
A chunk is at most 8,192 rows (
ROW_CHUNK_ROWS) in the form a job's edge carries: the user tags, the system-tag columns, the data columns (a data-tag once, among the tags) and one_source_<column>token column per data column, with each row's data context beside it. It is the record batch an ITL-1347 channel carries before the last step of the row-built form (the source-info field flags, decided over all rows). Next in this line of work: operator nodes runasync_execute_batchesover record-batch channels (the streaming join kernels for joins), and a node keeps a reference to spilled or stored rows instead of the table.Tests
tests/test_core/operators/test_row_chunks.py: the row table and both streams equal the row-list builders' at chunk sizes 1, 3, 4, 11 and 8,192, with data-tags and tag-only tags, two tags and several data columns, a row with a missing token; at most one chunk of pairs is held; a channel is collected in order; a result read once is not kept; async jobs over several chunks give the sync rows (map_data,group_by,drop_nullsthenbatch), with equal content hashes; a job asks the async orchestrator to keep no rows.Run locally:
tests/test_pipeline,tests/test_core/operators,tests/test_core/streams,tests/test_core/function_pod(18,857 passed, one process),ruff check,ruff format --check, basedpyright (0 errors), golden--check(no value moved).Review findings and their tests
ArrowTableStreamsubclass or haditer_dataset on the instancerows_oncetakes the unkept path only for exactlyArrowTableStreamwith its own iteratortest_a_result_streams_own_iterator_is_never_bypassedmainreturns no rows for an empty other inputRowChunks.addraises for want of memory only: the rows wait as they came and the error is raised byrow_table(), as the row list raised ittest_rows_that_cannot_make_one_table_raise_when_it_is_read_not_when_added,test_a_barrier_with_an_empty_input_never_reads_the_other_as_a_tabletest_a_chunk_that_failed_once_is_never_built_or_given_again,test_a_job_never_succeeds_with_rows_twice_after_a_failed_allocationtest_a_row_is_not_read_when_it_is_added,test_a_barrier_leaves_no_reader_behindtest_rows_after_a_chunk_that_cannot_be_built_are_not_keptmaterialize_results=Falseto the async orchestratortest_an_async_job_run_asks_the_orchestrator_to_keep_no_rows,test_a_jobs_nodes_read_the_same_whatever_materialize_results_saysMentions ITL-1464.
🤖 Generated with Claude Code