michaeljmarshall commented on pull request #9393: URL: https://github.com/apache/pulsar/pull/9393#issuecomment-775287323
I dug into this a bit more this morning, and it's interesting to point out that there are two fundamental differences between the system I am running tests on (macOS, or non linux) and @lhotari's system, which is linux. I'm guessing the `Azure VM` @lhotari references above is a linux machine, but it'd be good to confirm. This _might_ explain some of the differences we're seeing regarding reproducibility. The following conditional block determines the way a broker calculates cpu (and all other) host usage: https://github.com/apache/pulsar/blob/7c68ade453136895d19fa4723351d26256f3d624/pulsar-broker/src/main/java/org/apache/pulsar/broker/tools/LoadReportCommand.java#L94-L102 I plan to take a look at the `LinuxBrokerHostUsageImpl` class later. I wonder if there is a bug in that code because we saw that `Infinity` value for CPU usage in the logs above. I'm guessing we're dividing by 0 in some rare edge case. There could certainly be an issue in the `GenericBrokerHostUsageImpl` class, too, but it seems to me that we're more consistently reproducing the problem in the linux version, so that's where I'll look at the linux class next. It's worth mentioning that neither of these Usage classes are explicitly tested. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
