Do not log full worker info in retire_workers #8935
Merged
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.
Whenever we retire a worker we're apparently logging the
WorkerState.identity
information to the internal event system.I've seen individual events of this message grow to 150KiB and beyond for large clusters.
Apart from the unnecessary memory this eats up, this can cause issues when the message is ingested elsewhere. It can also become quite a substantial problem if this message is tried being printed since that can easily overflow buffers and lock up the scheduler process.
While all of those ingestion/logging issues are not the fault of this code, logging this information is entirely unnecessary and too verbose.
As an example of the information that's being logged
A few of those keys may be remotely interesting when debugging why / why not certain workers are retiring but I don't think this approach is feasible.