This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
ISSUE-20020: [Bug] [pulsar-function-go] - bounds check issue on user metrics causing go function crash for stats
command
#5690
Labels
Original Issue: apache#20020
Search before asking
Version
issuing a
pulsar-admin functions stats
check on a go function will cause it to crash if no user metrics are defined. This is because it makes a similar assumption to the other metrics calls that the result ofgi.getFilteredMetricFamilies
will have alen
of at least 1. If there are no user metrics, it will not, and it will cause the agent to restart.PR incoming
Minimal reproduce step
pulsar-admin functions stats --fqfn tenant/namespace/functionname
What did you expect to see?
Actual stats
What did you see instead?
stats of zero. function restart
Anything else?
No response
Are you willing to submit a PR?
Considering as this is basically my fault, yes I am willing to submit a PR.
The text was updated successfully, but these errors were encountered: