Commit 0bb1573
authored
atlas: handle OR with multiple matches (#1184)
Update query index to automatically dedup results to handle
the case of OR clauses where both sides match the same data
point. Before, the same match would be returned for each OR
clause that matched a given data point. If the consumer did
not handle that case, then they could aggregate the same
value multiple times leading to incorrect results.
This will add some overhead as the set needs to be maintained,
but should improve correctness for general usage.1 parent cdd5bbe commit 0bb1573
File tree
2 files changed
+35
-1
lines changed- spectator-reg-atlas/src
- main/java/com/netflix/spectator/atlas/impl
- test/java/com/netflix/spectator/atlas/impl
2 files changed
+35
-1
lines changedLines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
66 | 88 | | |
67 | 89 | | |
68 | 90 | | |
| |||
365 | 387 | | |
366 | 388 | | |
367 | 389 | | |
368 | | - | |
| 390 | + | |
369 | 391 | | |
370 | 392 | | |
371 | 393 | | |
| |||
473 | 495 | | |
474 | 496 | | |
475 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
476 | 502 | | |
477 | 503 | | |
478 | 504 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
319 | 327 | | |
320 | 328 | | |
321 | 329 | | |
| |||
0 commit comments