Commit 21eb9bd
authored
Use separate searchers for "search visibility" vs "move indexing buffer to disk (#26972)
Today, when ES detects it's using too much heap vs the configured indexing
buffer (default 10% of JVM heap) it opens a new searcher to force Lucene to move
the bytes to disk, clear version map, etc.
But this has the unexpected side effect of making newly indexed/deleted
documents visible to future searches, which is not nice for users who are trying
to prevent that, e.g. #3593.
This is also an indirect spinoff from #26802 where we potentially pay a big
price on rebuilding caches etc. when updates / realtime-get is used. We are
refreshing the internal reader for realtime gets which causes for instance
global ords to be rebuild. I think we can gain quite a bit if we'd use a reader
that is only used for GETs and not for searches etc. that way we can also solve
problems of searchers being refreshed unexpectedly aside of replica recovery /
relocation.
Closes #15768
Closes #269121 parent e1679bf commit 21eb9bd
File tree
8 files changed
+220
-94
lines changed- core/src
- main/java/org/elasticsearch
- action/termvectors
- index
- engine
- shard
- test/java/org/elasticsearch/index
- engine
- shard
8 files changed
+220
-94
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | | - | |
310 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
Lines changed: 29 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
469 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
470 | 471 | | |
471 | 472 | | |
472 | 473 | | |
| |||
494 | 495 | | |
495 | 496 | | |
496 | 497 | | |
497 | | - | |
| 498 | + | |
| 499 | + | |
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
503 | 505 | | |
| 506 | + | |
| 507 | + | |
504 | 508 | | |
505 | 509 | | |
506 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
507 | 525 | | |
508 | 526 | | |
509 | 527 | | |
510 | 528 | | |
511 | 529 | | |
512 | 530 | | |
513 | | - | |
| 531 | + | |
514 | 532 | | |
515 | 533 | | |
516 | 534 | | |
| |||
536 | 554 | | |
537 | 555 | | |
538 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
539 | 561 | | |
540 | 562 | | |
541 | 563 | | |
| |||
768 | 790 | | |
769 | 791 | | |
770 | 792 | | |
771 | | - | |
| 793 | + | |
772 | 794 | | |
773 | 795 | | |
774 | 796 | | |
| |||
1306 | 1328 | | |
1307 | 1329 | | |
1308 | 1330 | | |
1309 | | - | |
| 1331 | + | |
1310 | 1332 | | |
1311 | 1333 | | |
1312 | 1334 | | |
| |||
0 commit comments