Skip to content

Fix downsample persistent task params serialization (#106878)#106896

Merged
elasticsearchmachine merged 1 commit intoelastic:8.13from
dnhatn:8.13-downsample
Mar 29, 2024
Merged

Fix downsample persistent task params serialization (#106878)#106896
elasticsearchmachine merged 1 commit intoelastic:8.13from
dnhatn:8.13-downsample

Conversation

@dnhatn
Copy link
Copy Markdown
Member

@dnhatn dnhatn commented Mar 29, 2024

Missing a check on the transport version results in unreadable cluster
state if it includes a serialized instance of DownsampleShardTaskParams.
serie indices. Reading an optional array requires reading a boolean
first which is required to know if an array of values exists in
serialized form. From 8.13 on we try to read such a boolean which is not
there because older versions don't write any boolean nor any string
array. Here we include the check on versions for backward compatibility
skipping reading any boolean or array whatsoever whenever not possible.

Customers using downsampling might have cluster states including such
serielized objects and would be unable to upgrade to version 8.13. They
will be able to upgrade to any version including this fix.

This fix has a side effect #106880

Backport of #106878 to 8.13

Missing a check on the transport version results in unreadable cluster state
if it includes a serialized instance of DownsampleShardTaskParams.
serie indices.
Reading an optional array requires reading a boolean first which is required to
know if an array of values exists in serialized form. From 8.13 on we try to
read such a boolean which is not there because older versions don't write any
boolean nor any string array. Here we include the check on versions for backward
compatibility skipping reading any boolean or array whatsoever whenever not possible.

Customers using downsampling might have cluster states including such serielized
objects and would be unable to upgrade to version 8.13. They will be able to
upgrade to any version including this fix.

This fix has a side effect elastic#106880
@dnhatn dnhatn added backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :StorageEngine/Downsampling Downsampling (replacement for rollups) - Turn fine-grained time-based data into coarser-grained data v8.13.1 labels Mar 29, 2024
@dnhatn dnhatn requested a review from a team as a code owner March 29, 2024 03:08
@elasticsearchmachine elasticsearchmachine merged commit 9287f29 into elastic:8.13 Mar 29, 2024
@dnhatn dnhatn deleted the 8.13-downsample branch March 29, 2024 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :StorageEngine/Downsampling Downsampling (replacement for rollups) - Turn fine-grained time-based data into coarser-grained data v8.13.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants