Include 8.x backport version in index version checks for offset encoding#125447
Conversation
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
| public static final IndexVersion USE_SYNTHETIC_SOURCE_FOR_RECOVERY_BY_DEFAULT_BACKPORT = def(8_526_0_00, parseUnchecked("9.12.1")); | ||
| public static final IndexVersion SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_KEYWORD_BACKPORT_8_X = def(8_527_0_00, Version.LUCENE_9_12_1); | ||
| public static final IndexVersion SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_NUMBER_BACKPORT_8_X = def(8_528_0_00, Version.LUCENE_9_12_1); | ||
| public static final IndexVersion SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_BOOLEAN_BACKPORT_8_X = def(8_529_0_00, Version.LUCENE_9_12_1); |
There was a problem hiding this comment.
I think this version doesn't exist in the 8.x branch?
Thinking more about this, given the 8.19.0 has not been released yet. I think we reuse the SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_KEYWORD_BACKPORT_8_X index version. Also in 8.x branch, however I see that SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_NUMBER was added. So In think here we can just use SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_NUMBER in places where SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_BOOLEAN_BACKPORT_8_X is used?
There was a problem hiding this comment.
When I've been backporting the PRs adding offset encoding, I've been creating new index versions for each backport. The index version SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_BOOLEAN_BACKPORT_8_X (8_529) is still pending in backport PR #125596.
Instead of adding a new version, should I update #125596 to instead use 8_528 for the boolean field mapper, since there hasn't been an 8.x release yet?
If so, should I also use 8_528 for future offset encoding backports (unsigned long and scaled float)?
Then I would update this PR to use 8_528 for both numeric and boolean fields.
There was a problem hiding this comment.
OK, I opened #125610 to use 8_527 for all the 8.x offset encoding implementations. I also updated the version checks here to always just look at 8_527. Which is what we were already doing, so this PR is essentially just renaming the constant.
Per elastic#125610 we only need 1 index version for the 8.x offset encoding implementations (since there haven't been any 8.x releases).
…ys-index-version-fix
Renamed to SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_BACKPORT_8_X since it will include all 8.x implementations of arrays offset encoding.
This patch updates the index version checks in FieldArrayContext#getOffsetsFieldName to be aware of indices with offset encodings possibly created on 8.x versions of elasticsearch.