Commit 6239464
authored
Fix postings cache size estimation and add postings count to spans (#980)
* Fix postings cache size estimation and add postings count to spans
The size.Of() already returns recursive size including postings cloner,
so we don't need to add EstimateSize(). Instead, track the actual number
of postings separately and add it to spans for better observability.
Previously we incorrectly estimated postings count as size/8, but the
size includes more than just postings data.
* Remove unnecessary casting
* Use plain int
* Fix tests1 parent 14d2a30 commit 6239464
File tree
3 files changed
+12
-11
lines changed- tsdb
- index
3 files changed
+12
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
941 | 941 | | |
942 | 942 | | |
943 | 943 | | |
944 | | - | |
945 | | - | |
946 | | - | |
| 944 | + | |
| 945 | + | |
947 | 946 | | |
948 | 947 | | |
949 | 948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
454 | 455 | | |
455 | | - | |
| 456 | + | |
456 | 457 | | |
457 | 458 | | |
458 | | - | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| |||
563 | 564 | | |
564 | 565 | | |
565 | 566 | | |
566 | | - | |
| 567 | + | |
567 | 568 | | |
568 | 569 | | |
569 | 570 | | |
| |||
608 | 609 | | |
609 | 610 | | |
610 | 611 | | |
| 612 | + | |
611 | 613 | | |
612 | 614 | | |
613 | 615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
679 | | - | |
| 679 | + | |
680 | 680 | | |
681 | | - | |
| 681 | + | |
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
858 | | - | |
| 858 | + | |
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
| |||
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
968 | | - | |
| 968 | + | |
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
| |||
0 commit comments