-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-33023 Prevent periodic sinks from collecting if prepare fails #19326
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33023 Jirabot Action Result: |
Added return code to base class prepareToStartCollecting method to prevent starting the collection thread. Signed-Off-By: Kenneth Rowland [email protected]
9292f99
to
defb22d
Compare
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.
@kenrowland this seems fine.
However, the logSink seems to assume logging is always available, it might not be worth querying the logmanager in order to avoid unnecessary metric processing if no logging is going to be reported anyway but you should look into that if you haven't done so already.
Also, I was initially surprised the prometheus sink wasn't updated but realized it implements a basic interface w/out the preparetostartcollecting method, did you consider preventing it from collecting if the startCollection fails?
@rpastrana As far as prometheus goes, since it is a polled sink, it could decide to no do collection and simply not listen for the polling call. The call to startCollection only tells it to start listening. No other resources or actions are done by the framework, Failing the startCollection call wouldn't really do anything. |
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.
If the log sink prepareToStartCollent return value is not 100% accurate it should be fixed in this pr. If you plan to do that work in a separate PR, add the jira here.
@rpastrana Opened HPCC-33101 for the logging sink to check current log levels. |
@ghalliday Please merge |
Jirabot Action Result: |
Added return code to base class prepareToStartCollecting method to
prevent starting the collection thread.
Signed-Off-By: Kenneth Rowland [email protected]
Type of change:
Checklist:
Smoketest:
Testing: