[BREAKING] Only store hash of distributions over time #12
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.
Evaluation resource has been storing list of replicas to each history
record. It appears to still blow out of the waters the size of the
object on big number of replicas. This change removes the distribution
from history records on evaluations. The idea is that we store the last
known projected winning distribution and compare it to the current one,
and if current one becomes the winner - we store it insead. At no point
in time we should need to know any other non-winning distribution, other
than what was its hash, how many times we've seen it and when was the
last time we've seen it.
There would be an edge case when a while ago there was a very much
wanted distribution that no longer wanter but it's total seen count is
higher than any of the current distributions. When that huge part of the
history goes out of the bounds and getting erased - we might not have
current projection anymore. In that case evaluator will go in not ready
state for a while until the new projected winning distribution is clear.
This change updates CRDs in-place with removal of fields, which is ok
because this is still beta.