Commit d75f666
authored
Reduce latency in fetch phase for large shard counts (elastic#120419)
We can reduce the latency of the fetch response by a non-trivial amount by moving
the context-freeing for irrelevant shards to the end of the forked action.
For large shard counts (and/or with security in the mix) the old comment is not entirely
correct and waking up the selector many times over + doing some authz work might consume
macroscopic time.
Moving the freeing to the end of the task causes the fetches to be sent out potentially much quicker,
reduces contention on the counter and reduces the impact of potential head-of-line blocking issues
on the connections that might see context freeing needlessly queue after actual fetches.1 parent 0a5d2e7 commit d75f666
File tree
1 file changed
+14
-13
lines changed- server/src/main/java/org/elasticsearch/action/search
1 file changed
+14
-13
lines changedLines changed: 14 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | 161 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
173 | 165 | | |
174 | 166 | | |
175 | 167 | | |
176 | 168 | | |
177 | | - | |
| 169 | + | |
178 | 170 | | |
179 | 171 | | |
180 | | - | |
| 172 | + | |
181 | 173 | | |
182 | 174 | | |
183 | 175 | | |
184 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
0 commit comments