-
Notifications
You must be signed in to change notification settings - Fork 101
Fixing cluster stats response #4632
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
base: main
Are you sure you want to change the base?
Conversation
Following you can find the validation changes for the APIs you have modified.
You can validate these APIs yourself by using the |
nodes.stats will also be fixed, but this one and the other one need to be merged first |
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.
In SegmentStats
, I'm seeing (existing) fields that I would not expect:
- index_writer_max_memory_in_bytes?: long
- stored_memory?: ByteSize
In StatsResponseBase
:
status
appears to be optional- should we add ESQL metrics?
In ClusterFileSystem
, there are other optional fields
Still need to finish reviewing types.ts and Stats.ts.
@@ -215,6 +215,7 @@ export type ExpandWildcards = ExpandWildcard | ExpandWildcard[] | |||
|
|||
/** | |||
* Health status of the cluster, based on the state of its primary and replica shards. | |||
* @non_exhaustive |
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 I remove this, I get two failures where the health was "unavailable", both in CCS tests (because we don't support CCS with the current test runner). Should we just add unavailable
to the list and remove the non_exhaustive
annotation?
I'm also not sure about the backwards-compatibility implications.
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.
the reason I went for @non_exhaustive
is that there are two HealthStatus enums in the server code:
- ClusterHealthStatus: in theory can be only red, green and yellow, but yaml tests show that it can also be "unavailable", mapped with HealthStatus in the spec
- HealthStatus: can be red, green, yellow or unknown, mapped with IndicatorHealthStatus in the spec
In the spec we mostly use HealthStatus while the second one is mapped with the IndicatorHealthStatus enum, which is only used in the health_report
endpoint. Since I didn't want to introduce breaking changes by renaming IndicatorHealthStatus and using it to replace HealthStatus when needed, I was thinking of just using @non_exhaustive
since I'm not even sure where unavailable
comes from, but I agree it's not 100% correct.
Should we introduce the breaking changes for 9.1 to fix every variation of health status?
nice catch, removing those
status is optional yes, while
adding them, thank you! |
Following you can find the validation changes for the APIs you have modified.
You can validate these APIs yourself by using the |
From 0/27 validated responses to 27/27. Providing server side proof for each of these changes would be a lot, most of these changes are adding the
in_bytes
(or not in_bytes) alternative for fields and making both optional.New classes:
GlobalOrdinalsStats
-> server codeClusterSnapshotStats
-> server codeSearchUsageStats
-> server codeDenseVectorStats
-> server codeSparseVectorStats
-> server codeSince it was broken before I think this can all be backported safely