Changes following up on PR #807810 .
Made the validation checking function return a slice of error messages
rather than just a bit.
Replaced all the `int32` with `int` because this is intended for more
than just the priority-and-faireness feature and so should not be a
slave to its configuration datatypes.
Introduced ShuffleAndDealIntoHand, to make memory allocation the
caller's problem/privilege.
Made the hand uniformity tester avoid reflection, evaluate the
histogram against the expected range of counts, and run multiple test
cases, including one in which the number of hash values is a power of
two with four extra bits (as the validation check requires) and one in
which the deck size is not a power of two.
Updated the fairqueuing implementation to use the shuffle sharding
utility package.
Introduced `OptionalWaitGroup` as a convenient abstraction of
`*WaitGroup`.
Made fairqueuing and emptyRelay::HandleEmpty update the
OptionalWaitGroup and plumbed requestManagementSystem to be able to do
that. Making HandleEmpty update the OptionalWaitGroup illustrates how
a test function that is testing the quiesce functionality of a
QueueSet would do that. This is also a step toward making
requestManagementSystem update the OptionalWaitGroup properly when
there are configuration changes; the remaining steps will include
plumbing the OptionalWaitGroup through the work queue and its worker.
Even without this change it is already possible to test the rest of
QueueSet functionality without any special entry methods. It is also
easy to test the functionality of a requestManagementSystem excepting
its config controller.
The test runs a scenario over time and evaluates fairness of the
result.
There is no real QueueSet implementation now, so only a dummy is
tested.
In other news, this change introduces a dummy QueueSet implementation
that exerts no control.
Moved the top-level logic associated with the data in
k8s.io/apiserver/pkg/util/flowcontrol into the same package, greatly
simplifying its interface.
Also plumbed the call to NewRequestManagementSystem (1) into
`RecommendedOptions::ApplyTo(RecommendedConfig)` for running in
aggregated servers and (2) into buildGenericConfig in the
kube-apiserver code.
Also moved the definitions of FairQueuingSystem and FairQueuingFactory
into the directory where Aaron is developing his implementation of
those.
Also did some renaming to satisfy golint: FairQueuingSytem became
QueueSet, and FairQueuingFactory became QueueSetFactory.
Also realized that the clock should be passed in every Create... call
to the Factory, the Factory should hold the clock to use (as well as
the WaitGroup that will be helpful for testing).
(1) removed the idea of multiple config queue workers; it will be
simpler and adequate if there is only 1.
(2) attempted to clarify the comment on FairQueuingSystem::DoOnEmpty
to (a) make the division of responsibilities clearer, (b) make a
precise statement of the semantics, and (c) be less prescriptive of
how the filter uses this method.
(this is the third edition of this change)
* Fix lint errors related to receiver name
Ref #68026
* Fix lint errors related to comments
Ref #68026
* Fix package name in comments
Ref #68026
* Rename Cpu to CPU
Ref #68026
* Fix lint errors related to naming convention
Ref #68026
* Remove deprecated field
DoNotUse_ExternalID has been deprecated and is not in use anymore.
It has been removed to fix lint errors related to underscores in field
names.
Ref #68026, #61966
* Include pkg/apis/core in golint check
Ref #68026
* Rename var to fix lint errors
Ref #68026
* Revert "Remove deprecated field"
This reverts commit 75e9bfc168077fcb9346e334b59d60a2c997735b.
Ref #82919
* Remove math from godoc
Ref #82919, #68026
* Remove underscore from var name
Ref #68026
* Rename var in staging core api type
Ref #68026