Commit 152af43
authored
[8.x] Stop caching source map on SearchHit#getSourceMap (elastic#119888) (elastic#120743)
This call has the side effect that if you are iterating a number of hits
calling this method, you will be increasing the memory usage by a non
trivial number which in most of cases is unwanted. Therefore this commit
removes this caching all together and add an assertion so the method is
call once during the lifetime of the object.
backport elastic#1198881 parent 109b6ff commit 152af43
File tree
55 files changed
+480
-375
lines changed- modules/parent-join/src/internalClusterTest/java/org/elasticsearch/join/query
- server/src
- internalClusterTest/java/org/elasticsearch/search
- aggregations/metrics
- fetch/subphase
- searchafter
- sort
- source
- suggest
- main/java/org/elasticsearch/search
- aggregations/metrics
- test/java/org/elasticsearch/search
- test/framework/src/main/java/org/elasticsearch/search
- x-pack/plugin
- enrich/src
- main/java/org/elasticsearch/xpack/enrich
- test/java/org/elasticsearch/xpack/enrich/action
- ent-search/src/main/java/org/elasticsearch/xpack/application/rules
- inference/src/test/java/org/elasticsearch/xpack/inference/registry
- ml/src
- main/java/org/elasticsearch/xpack/ml
- datafeed/extractor/scroll
- dataframe
- extractor
- inference
- process
- extractor
- test/java/org/elasticsearch/xpack/ml
- datafeed/extractor/scroll
- dataframe
- extractor
- process
- extractor
- monitoring/src
- internalClusterTest/java/org/elasticsearch/xpack/monitoring/integration
- test/java/org/elasticsearch/xpack/monitoring/exporter/local
- security/src
- internalClusterTest/java/org/elasticsearch/integration
- main/java/org/elasticsearch/xpack/security/authc
- transform/src/main/java/org/elasticsearch/xpack/transform/transforms/latest
- watcher/src/internalClusterTest/java/org/elasticsearch/xpack/watcher
- test/integration
- transform
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
55 files changed
+480
-375
lines changedLines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
202 | 204 | | |
203 | | - | |
204 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
658 | | - | |
659 | | - | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
660 | 661 | | |
661 | 662 | | |
662 | 663 | | |
| |||
927 | 928 | | |
928 | 929 | | |
929 | 930 | | |
930 | | - | |
931 | | - | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
932 | 934 | | |
933 | 935 | | |
934 | 936 | | |
| |||
Lines changed: 18 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
493 | | - | |
494 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
| |||
507 | 508 | | |
508 | 509 | | |
509 | 510 | | |
510 | | - | |
511 | | - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
512 | 514 | | |
513 | 515 | | |
514 | 516 | | |
| |||
845 | 847 | | |
846 | 848 | | |
847 | 849 | | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
858 | 856 | | |
859 | 857 | | |
860 | 858 | | |
| |||
866 | 864 | | |
867 | 865 | | |
868 | 866 | | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
879 | 873 | | |
880 | 874 | | |
881 | 875 | | |
| |||
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
438 | 440 | | |
439 | 441 | | |
440 | 442 | | |
441 | | - | |
442 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
443 | 446 | | |
444 | 447 | | |
445 | 448 | | |
| |||
469 | 472 | | |
470 | 473 | | |
471 | 474 | | |
472 | | - | |
473 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
474 | 478 | | |
475 | 479 | | |
476 | 480 | | |
| |||
505 | 509 | | |
506 | 510 | | |
507 | 511 | | |
508 | | - | |
509 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
510 | 515 | | |
511 | 516 | | |
512 | 517 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | | - | |
148 | 149 | | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
Lines changed: 27 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
59 | 61 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | | - | |
| 88 | + | |
86 | 89 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
| |||
0 commit comments