Reject time losses mid-run, take 2 #1571
Open
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.
Considerably more sophisticated than my prior attempt some months ago. There's a lot going on here.
The first
6commitsare very nearly non functional, being solely cleanups and refactorings which were necessary for me to even hope to be able to understand what I was modifying (and even then I'm only like 80% sure). Even if the functionality of this PR is rejected, the first6commitsof cleanups and refactoring should be considered/merged independently. (Thethirdcommit is slightly functional, but only the slightest bit, I believe only cosmetically.)The last
twocommitsare the meat of the proposed new functionality. Instead of waiting until the run is "over" to autopurgecrash_or_time
tasks (if autopurge is even set, which it usually is not), we purge them immediately, mid-run, if the worker has a recent history of spewing garbage.My usual caveat applies: this is completely untested, and even more than that, I'm not even entirely sure that the last
twocommitsare correct, in the sense of doing what I intended. In any case, I believe it should be easier to understand each commit individually than the grand sum diff. All kinds of review/feedback is requested and appreciated.(Also, I think I found two other potential bugs, not directly related; rather than change them, I merely marked them with comments, to be reconsidered later.)
(Also also, does the rename "bad" --> "purged" imply a db upgrade is required?)