Commit d85ae7d
authored
[ML] Add missing job_id filter to Anomaly Detection data deleter (elastic#138160)
When reverting to a previous model snapshot intervening results are removed.
A bug in the delete-by-query query meant that results were deleted for all jobs
in this period not just the job being deleted. The fix here reinstates the job_id
filter.1 parent 3b7ac32 commit d85ae7d
File tree
6 files changed
+83
-14
lines changed- docs/changelog
- x-pack/plugin/ml
- qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration
- src
- main/java/org/elasticsearch/xpack/ml/job/persistence
- test/java/org/elasticsearch/xpack/ml/job/persistence
6 files changed
+83
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | 270 | | |
277 | 271 | | |
278 | 272 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
306 | 328 | | |
307 | 329 | | |
308 | 330 | | |
| |||
Lines changed: 34 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
78 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
79 | 106 | | |
80 | 107 | | |
81 | 108 | | |
| |||
126 | 153 | | |
127 | 154 | | |
128 | 155 | | |
129 | | - | |
130 | 156 | | |
131 | 157 | | |
132 | 158 | | |
133 | 159 | | |
134 | 160 | | |
135 | | - | |
| 161 | + | |
| 162 | + | |
136 | 163 | | |
137 | 164 | | |
138 | 165 | | |
| |||
156 | 183 | | |
157 | 184 | | |
158 | 185 | | |
159 | | - | |
| 186 | + | |
160 | 187 | | |
161 | 188 | | |
162 | 189 | | |
| |||
187 | 214 | | |
188 | 215 | | |
189 | 216 | | |
190 | | - | |
| 217 | + | |
191 | 218 | | |
192 | 219 | | |
193 | 220 | | |
194 | 221 | | |
195 | 222 | | |
196 | 223 | | |
197 | 224 | | |
198 | | - | |
| 225 | + | |
199 | 226 | | |
200 | 227 | | |
201 | 228 | | |
| |||
219 | 246 | | |
220 | 247 | | |
221 | 248 | | |
222 | | - | |
| 249 | + | |
223 | 250 | | |
224 | 251 | | |
225 | 252 | | |
| |||
229 | 256 | | |
230 | 257 | | |
231 | 258 | | |
232 | | - | |
| 259 | + | |
233 | 260 | | |
234 | 261 | | |
235 | 262 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| |||
x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleterTests.java
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| |||
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
148 | 165 | | |
149 | 166 | | |
150 | 167 | | |
| |||
162 | 179 | | |
163 | 180 | | |
164 | 181 | | |
| 182 | + | |
165 | 183 | | |
166 | 184 | | |
167 | 185 | | |
| |||
178 | 196 | | |
179 | 197 | | |
180 | 198 | | |
| 199 | + | |
181 | 200 | | |
182 | 201 | | |
0 commit comments