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
SizableContainer
trait spoke about capacities for containers, meant to allow them to express their capacity, a preference for a capacity, and how to acquire more capacity. It seems like this logic was used to implement some right-sizing of containers, but always in a way that the container could have chosen for itself anyhow.With that in mind, this PR tries out a new trait that instead looks like
Here the container can indicate if it is "at capacity" or in
Vec
terms if its length equals its capacity, and also it can restore its capacity. Each implementation had seemingly straight-forward implementations, and the place the logic was used seem to work great with these functions.The commits continue with one that removes
PushPartitioned
and allowsExchange
to be parameterized byCB: ContainerBuilder
, rather than by containers.One VERY IMPORTANT thing to sort out: if folks are allowed to create
Exchange
edges with their own container builders, they must preserve the counts correctly, otherwise progress tracking breaks. This might be a moment to revisit that, and see if there is a reasonable decoupling of.len()
from "number of items in the container". At least, there is a very specific thing that needs to be maintained (count of records accepted), and perhaps it shouldn't be up to the container builder to maintain this?