Commit c93a726
fix: cap the typed-structure dictionary in RecordEncoder
The per-encoder typedStructs dictionary (structon's random-access typed structs)
is append-only and pinned on the long-lived primary store. A wide/sparse schema
whose records vary by per-field value width mints a distinct structure per
shape×width combination and grows the dictionary unbounded, exhausting memory
(observed on a bulk-loaded table under replication catch-up).
Default maxOwnStructures to 256 (caller-overridable), bounding each dictionary.
Bumps structon to ^1.0.6, which adds the cap (uncapped by default).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent f7a6264 commit c93a726
3 files changed
Lines changed: 9 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
0 commit comments