-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Prevent MaxListenersExceededWarning observed in validator's abort controller #4512
Prevent MaxListenersExceededWarning observed in validator's abort controller #4512
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
// This AbortController interrupts the sleep() calls when waiting for genesis | ||
genesisReqController: new AbortController(), | ||
// This AbortController interrupts the validators ops: clients call, clock etc | ||
validatorOpsController: new AbortController(), |
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 looks like you could only need 1 AbortController, can you try that?
note this was merged before I had time to review Having to pass an AbortController to the validator class is a very weird API. Consumers would be asking why? And the only justification is that we don't want to print a log. The tradeoff here doesn't make sense IMO. Is this really the only way to suppress such log in NodeJS? I think there must be a better solution. |
Motivation
See #3569 and # #4394 for bug report
Description
While running the validator client I noticed the following lines in the log:
This PR prevents this by setting the max event listener for the abort controller that trigger the log to infinity.
resolves #3569
resolves #4394