Commit 84470e9
authored
Alternate approach to speed up ignored_source access (#133839)
In #132142 and #132428 we split up ignored_source entries into distinct
lucene fields, then added an optimized field visitor to speed up
retrieving unmapped values for INSIST_🐔.
However, since this approach creates a unique lucene field for every
ignored_source entry, we can very quickly have a lot of lucene fields
if there are a lot of unique unmapped fields per document. This can
cause significant slowdowns in indexing throughput and merge time.
This PR addresses those limitations by reverting back to keeping all
ignored_source entries under the same lucene field. However, we still
keep some of the speedups from that prior work by continuing to
coalesce multiple ignored_source entries for the same field into a
single entry, allowing the field visitor to exit early.
Unfortunately, we do lose some time compared to the original
optimizations because now the field visitor cannot look at the
fieldInfo to decide whether or not to visit a field, and it instead
needs to actually visit and materialize each ignored_source entry before
it can decide whether or not to keep it.1 parent 89d919d commit 84470e9
File tree
18 files changed
+575
-482
lines changed- server/src
- main/java/org/elasticsearch
- index
- fieldvisitor
- get
- mapper
- search
- fetch
- test/java/org/elasticsearch/index
- fieldvisitor
- mapper
- test/framework/src/main/java/org/elasticsearch/index/mapper
- x-pack/plugin
- core/src
- main/java/org/elasticsearch/xpack/core/security/authz
- accesscontrol
- permission
- test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol
- security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol
18 files changed
+575
-482
lines changedLines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
42 | | - | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | | - | |
114 | | - | |
115 | | - | |
| 115 | + | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | | - | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
125 | 135 | | |
126 | 136 | | |
127 | 137 | | |
| |||
133 | 143 | | |
134 | 144 | | |
135 | 145 | | |
136 | | - | |
| 146 | + | |
137 | 147 | | |
138 | 148 | | |
Lines changed: 1 addition & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| |||
202 | 200 | | |
203 | 201 | | |
204 | 202 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | 203 | | |
222 | 204 | | |
223 | 205 | | |
224 | 206 | | |
225 | 207 | | |
226 | 208 | | |
227 | | - | |
| 209 | + | |
228 | 210 | | |
229 | 211 | | |
230 | 212 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
58 | | - | |
| 56 | + | |
59 | 57 | | |
60 | 58 | | |
0 commit comments