-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix extra latency and add tests for that and non-unit width #104345
Conversation
This thing we have been calling "virtual time" no longer even has units of time; now it is seat-seconds. |
f3372bf
to
572ca92
Compare
The force-push to 572ca92c44d is a rebase plus the bug fix and testing for extra latency. |
/kind bug |
/priority important-soon |
572ca92
to
7e5c762
Compare
The force-push to 7e5c7620b4c adds checking that extra latency does not affect the timing of the return to the client and expands the test cases for extra latency. |
Added missing dispatching after delayed release of seats. Updated logging for all six situations of execution completion and seat release. Added behavioral tests for non-zero extra latency and non-unit width. Also added two tests for baseline functionality. Also improved some comments and other logging in `queueset.go`.
7e5c762
to
d2a27a5
Compare
The force-push to d2a27a5 locks down every test of extra latency to allow zero relative error. |
/triage accepted |
} | ||
} | ||
|
||
defer func() { | ||
if r.workEstimate.AdditionalLatency <= 0 { | ||
// release the seats allocated to this request immediately | ||
releaseSeatsLocked() | ||
if !klog.V(6).Enabled() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a slightly weird pattern to me, but it's harmless, so I'm not going to block on it.
[In general, I don't think logs at 4+ verbosity are useful, because there are so many of them that it's impossible to find anything there anyway. But we can follow up on it separately.]
} else { | ||
klog.Infof("QS(%s) at r=%s v=%.9fss: request %#+v %#+v finished lingering on %d seats, qs will have %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.virtualTime, r.descr1, r.descr2, r.workEstimate.Seats, qs.totRequestsExecuting, qs.totSeatsInUse) | ||
} | ||
qs.dispatchAsMuchAsPossibleLocked() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can thank the behavioral tests.
/lgtm Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MikeSpreitzer, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
What type of PR is this?
/kind bug
/kind cleanup
What this PR does / why we need it:
This PR adds dispatching after delayed release of seats.
This PR updates the logging in all six cases of execution completion and/or seat release.
This PR adds behavioral tests of various combinations of think time and extra latency,
which revealed the fact that the dispatching was missing.
This PR adds two behavioral tests of non-unit "width".
This PR also adds two tests for baseline functionality.
This PR also improves some comments and other logging in
queueset.go
.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: