Tests: add delete-by-query into translog in OldIndexBackwardsCompatibilityTests #10266
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR just improves our back compat tests in preparation for #10067. It's a standalone test improvement and I think we should push it first since when I deleted DBQ entirely in #10067, no tests failed when I broke back compat.
I fixed create-bwc-index.py to add a delete-by-query into the translog so that on upgrade the translog must be replayed, and I also fixed OldIndexBackwardsCompatibilityTests to confirm the expected documents are in fact deleted on upgrade.
I confirmed that if I intentionally break the translog replay of DBQ in master, OldIndexBackwardsCompatibilityTests in fact fails (good).
However, I hit a pre-existing back-compat bug caused long ago by #4074. I opened #10262 for this but I'm not sure how to fix it... for now I worked around it here by avoiding DBQ in translog for version <= 1.0.0 Beta2.
I also fixed get-bwc-version.py to special case 1.2.0 and pull that from maven instead of download.elasticsearch.org.