Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Core: delete-by-query fails to replay from translog < 1.0.0 Beta2 #10262
Working on #10067, improving our back-compat test indices so that the translog has a delete-by-query on upgrade, I hit this pre-existing back-compat bug where on upgrade of an index <= 1.0.0 Beta2 that has a DBQ in its translog, this exception shows up:
This is happening because of #4074 when we required that the top-level "query" is present to delete-by-query requests, but prior to that we required that it is not present. So the translog has a DBQ without "query" and when we try to parse it we hit this exception.
I have changes to create-bwc-index.py that shows the bug ... but I'm not sure how to cleanly fix it. Somehow on parsing a translog entry from an old enough version of ES we need to insert "query" at the top...