Repository navigation
fix(buffer): take the spool caps from config or the volume limit - #170
Merged
Merged
Conversation
The staged-bytes cap, startup free-space floor and quarantine cap were fixed at 8, 1 and 1 GiB. Only a comment tied them to the contract's 10Gi spool volume. Bigger volumes kept those values. Each is now a buffer key: staged_bytes_cap, min_free_spool_bytes and quarantine_bytes_cap. Unset, they default to 8/9, 1/9 and 1/9 of 90% of the volume size limit in SCALO_WRITABLE_PATH_LIMITS. A 10Gi limit still gives 8/1/1 GiB. With no declared limit the defaults stay 8/1/1 GiB. A zero staged_bytes_cap is refused. Staging::open takes the quarantine cap.
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 archiver's staged-bytes cap, startup free-space floor and quarantine cap were literals sized for the contract's 10Gi spool volume. Raising the volume in the chart left the caps at 8, 1 and 1 GiB.
Tests cover env resolution, the no-limit fallback, config overrides, volume-path matching, rejection of a zero cap, and the quarantine cap from Staging::open. The keys and argument did not exist before this change, so these tests cannot fail against the old code.
The archiver's chart may not set SCALO_WRITABLE_PATH_LIMITS. The scalo-service chart sets it from scalo 2.14.23. The archiver's library pin is 2.14.20, so it may be unset until the pin moves.