Commit 38cbf10
authored
[6.8] OsStats must be lenient with bad data from older nodes (#73616)
We've had a series of bug fixes for cases where an OsProbe gives negative
values, most often just -1, to the OsStats class. We added assertions to catch
cases where we were initializing OsStats with bad values. Unfortunately, these
fixes turned to not be backwards-compatible. In this commit, we simply coerce
bad values to 0 when data is coming from nodes that don't have the relevant bug
fixes.
Relevant PRs:
* #42725
* #56435
* #57317
Fixes #734591 parent d366690 commit 38cbf10
File tree
1 file changed
+25
-8
lines changed- server/src/main/java/org/elasticsearch/monitor/os
1 file changed
+25
-8
lines changedLines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
209 | 218 | | |
210 | 219 | | |
211 | 220 | | |
| |||
263 | 272 | | |
264 | 273 | | |
265 | 274 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
270 | 287 | | |
271 | 288 | | |
272 | 289 | | |
| |||
0 commit comments