Closed rmuir closed 6 months ago
With #20255 and #20327 we added serialization tests. The only missing tests are for NodeIndicesStats
and all CommonStats
and subobjects. They need to be reworked I think so that they can be made Writeable
, immutable and easily testable. They are quite hard to unit test at the moment. I left a TODO here.
@martijnvg is this being worked on internally?
This has been open for quite a while, and hasn't had a lot of interest. For now I'm going to close this as something we aren't planning on implementing. We can re-open it later if needed.
See the discussion on https://github.com/elastic/elasticsearch/pull/19717
The stats api has some problems, which makes it hard to safely add new statistics or even keep the current ones working:
-1
, in other methods you can see they will be clearly broken if the value is negative. I assume there are missing unit tests as well as missing checks and missing docs and bugs.@see
can help, as well as trying to improve the consistency of naming...catch (Exception)
and allowing things to be null that are unnecessary. For exampleManagementFactory
methods document whether or not something is guaranteed to be there in the jvm, we shouldn't allow these to be null or catch Exceptions. If its not guaranteed, sure, but those are special cases. This leniency hides the fact, for example, that classloader statistics are currently just "dropped" across the wire.I closed that PR because i don't think we should be piling on more statistics until we fix this stuff...