Commit 68f3f5c
truncate split lists in error logs using PrettySample (#6315)
* truncate split lists in error logs using PrettySample
When many splits fail during a search query, the error logs dump
every failed split (with its full error message) into a single log
line. At scale (hundreds of splits per query), this produces multi-KB
unreadable log lines.
Use PrettySample(5) to show only the first 5 items and a count of
the rest, matching the pattern already used for split_offsets in
leaf search. Also adds num_failed_splits/num_splits fields for easy
filtering without parsing the sample.
Files changed:
- root.rs: failed_splits in leaf search response (debug + error)
- list_terms.rs: failed_splits in list terms response
- fetch_docs.rs: split_ids on fetch docs error
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fetch_docs: tag each split future with its split_id in error context
Only one split fails when try_join_all returns an error; logging all
split IDs was misleading. Now each future carries its own split_id via
map_err context, so the error message identifies the exact failing split.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fmt: apply nightly rustfmt to fetch_docs.rs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 243960d commit 68f3f5c
3 files changed
Lines changed: 25 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
94 | 89 | | |
95 | 90 | | |
96 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | | - | |
| 781 | + | |
| 782 | + | |
782 | 783 | | |
783 | 784 | | |
784 | | - | |
| 785 | + | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
| |||
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
803 | | - | |
| 804 | + | |
804 | 805 | | |
805 | 806 | | |
806 | 807 | | |
| |||
0 commit comments