Repository navigation
[perf] Grow partition metadata row capacity geometrically - #229
0oshowero0 merged 2 commits into
Conversation
Signed-off-by: Christian Muertz <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: 0oshowero0 <[email protected]> Co-authored-by: Cursor <[email protected]>
|
Thanks for the PR @christian-muertz! Geometric row growth is a good point for incremental inserts. I pushed a small follow-up commit (
Verified locally with |
The Python controller grows each partition's production tensor and every consumer's status vector to the exact row count requested. Appending one row at a time repeatedly copies the whole partition. This change doubles row capacity when it fills and still satisfies a larger request in one allocation. It trades spare rows for fewer copies. A fetch with an empty field list considers only active rows, so spare capacity cannot appear in the result.
Starting with one row and requesting capacities 1 through 1,024 in order gave the following counts with one registered consumer.
mainAll 59 tests in
tests/test_controller_data_partitions.pypass. The new regression test fails onmainand covers reuse of a spare row, preservation of consumed state, and visibility of spare rows on fetch.