Commit 640bf4e
authored
Correctly retrieve data stream write index in
The `testUpgradeDataStream` test configures an ILM policy with force
merge on a data stream, which is then reindexed after a cluster upgrade.
The test used to determine the write index of the data stream by looking
at the backing index of the data stream in the cluster state metadata
and retrieving the index that was created last. While this may have
worked for this test suite thusfar, this is generally not the right way
to determine the write index of a data stream, as newer indices can be
put inside the data stream either manually or by ILM.
The latter is the case with the upcoming force merge improvements, where
we perform force merge on a cloned index, meaning the cloned index might
be newer than the write index, resulting in a test failure because the
real write index is not skipped in the `checkILMPhase` method and thus
fails on the ILM `phase` assertion.
We also improve the assertion message to include some more information
to aid test failure investigation.DataStreamsUpgradeIT (elastic#133433)1 parent a8d1f08 commit 640bf4e
File tree
1 file changed
+7
-16
lines changed- x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades
1 file changed
+7
-16
lines changedLines changed: 7 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| 217 | + | |
216 | 218 | | |
217 | 219 | | |
218 | | - | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
223 | | - | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
| |||
262 | 264 | | |
263 | 265 | | |
264 | 266 | | |
| 267 | + | |
265 | 268 | | |
266 | 269 | | |
267 | | - | |
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| |||
287 | 289 | | |
288 | 290 | | |
289 | 291 | | |
290 | | - | |
291 | | - | |
| 292 | + | |
292 | 293 | | |
293 | | - | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | 311 | | |
321 | 312 | | |
322 | 313 | | |
| |||
0 commit comments