feat(hotblocks): make the spill bound configurable#103
Merged
Conversation
The bound decides which chunks are prepared in memory and which build an out-of-core processor, so it is the one dial that trades ingest memory against the temp-file path #98 was written to avoid. Raising it past a dataset's flush size is what keeps that dataset off temp files; 0 puts every chunk back on them, which is the kill switch if the in-memory path ever misbehaves in production. Neither is reachable while the bound is a constant, and both are wanted per stack -- block sizes differ by an order of magnitude between them. The default stays 30 MB, so an unset flag renders exactly as before. Sizing it up is not free: the buffer is per dataset and mainnet runs 45 of them, so the worst case scales with the bound. Restores the knob from the first draft of #98, dropped there because nothing needed it yet.
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.
The spill bound decides which chunks are prepared in memory and which build an out-of-core processor. That makes it the one dial trading ingest memory against the temp-file path #98 was written to avoid, and it is currently a constant.
Two things want it reachable:
0puts every chunk back on the temp-file path — the way out if the in-memory prepare ever misbehaves, without a rollback.--spill-bound-bytes/SQD_SPILL_BOUND_BYTES, default 30 MB. An unset flag renders exactly as before, so this is inert until something sets it.Sizing it up is not free: the builder buffer is per dataset, so the worst case is
bound × datasetsagainst the process memory limit.This restores the knob from the first draft of #98, dropped there because nothing needed it yet. The unit tests move off the constant onto a small explicit bound, which also makes them cheaper.
🤖 Generated with Claude Code