Commit c08f32d
authored
Release each hit's aggregations before moving on to the next hit and unlink it from the shard result even earlier.
Also, do the aggregation-reduce earlier in the reduce steps to reduce average heap use over time.
To that effect, do not do the reduction in the search phase controller. This has the added benefit of removing any need for a fake aggs-reduce-context in scroll.
1 parent 969ad61 commit c08f32d
File tree
6 files changed
+116
-108
lines changed- server/src
- main/java/org/elasticsearch
- action/search
- search
- aggregations
- query
- test/java/org/elasticsearch/action/search
6 files changed
+116
-108
lines changedLines changed: 66 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
177 | | - | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | 193 | | |
197 | 194 | | |
198 | 195 | | |
| 196 | + | |
199 | 197 | | |
200 | | - | |
| 198 | + | |
201 | 199 | | |
202 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
206 | | - | |
| 212 | + | |
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
210 | 216 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 217 | + | |
214 | 218 | | |
| 219 | + | |
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
220 | | - | |
| 225 | + | |
221 | 226 | | |
222 | 227 | | |
223 | 228 | | |
| |||
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
252 | | - | |
253 | | - | |
254 | 257 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | 258 | | |
264 | 259 | | |
265 | 260 | | |
| |||
269 | 264 | | |
270 | 265 | | |
271 | 266 | | |
| 267 | + | |
272 | 268 | | |
273 | 269 | | |
274 | 270 | | |
275 | 271 | | |
276 | 272 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 273 | | |
281 | 274 | | |
282 | 275 | | |
| |||
285 | 278 | | |
286 | 279 | | |
287 | 280 | | |
288 | | - | |
289 | | - | |
290 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
291 | 285 | | |
292 | 286 | | |
293 | 287 | | |
| |||
302 | 296 | | |
303 | 297 | | |
304 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
305 | 338 | | |
306 | 339 | | |
307 | 340 | | |
| |||
517 | 550 | | |
518 | 551 | | |
519 | 552 | | |
520 | | - | |
521 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
522 | 557 | | |
523 | 558 | | |
524 | 559 | | |
| |||
Lines changed: 5 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
419 | | - | |
420 | | - | |
| 418 | + | |
421 | 419 | | |
422 | 420 | | |
423 | 421 | | |
| |||
521 | 519 | | |
522 | 520 | | |
523 | 521 | | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
| 522 | + | |
530 | 523 | | |
531 | 524 | | |
532 | 525 | | |
| |||
Lines changed: 1 addition & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
313 | 312 | | |
314 | 313 | | |
315 | 314 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | 315 | | |
328 | 316 | | |
329 | 317 | | |
| |||
339 | 327 | | |
340 | 328 | | |
341 | 329 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 330 | + | |
353 | 331 | | |
354 | 332 | | |
Lines changed: 31 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
206 | 204 | | |
207 | 205 | | |
208 | 206 | | |
209 | | - | |
210 | | - | |
211 | | - | |
| 207 | + | |
212 | 208 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
229 | 214 | | |
230 | 215 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 216 | + | |
241 | 217 | | |
242 | 218 | | |
243 | 219 | | |
244 | 220 | | |
245 | | - | |
246 | | - | |
| 221 | + | |
| 222 | + | |
247 | 223 | | |
248 | 224 | | |
249 | 225 | | |
| |||
257 | 233 | | |
258 | 234 | | |
259 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
260 | 248 | | |
261 | 249 | | |
262 | 250 | | |
| |||
280 | 268 | | |
281 | 269 | | |
282 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
283 | 281 | | |
284 | 282 | | |
285 | 283 | | |
| |||
0 commit comments