Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] fix: add missing translog sync interval option to index settings #544

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 1323796 from #518.

* fix: add missing translog sync interval option to index settings

Additionally, server response contains separate `translog` object,
which cannot be deserialized by present translog option deserializers.

Therefore, this commit introduces a corresponding `Translog` class,
similarly to how it is done for the `blocks` property.

Signed-off-by: Maksim Strutovskii <strutovsky.m.a@gmail.com>

* fix: encapsulate translog options into translog in index settings

Now that all the translog options are stored in a separate object, we
should remove the separate fields to avoid confusion.

Public methods (getters, builder setters) should remain intact, mark
them deprecated and point them to the corresponding translog fields.

Deserializer should still recognize string-valued translog attributes, keep
the deprecated setters as field deserializers.

Serializer does not have to produce string-valued translog attributes,
as server parses `translog` attribute. Do not write translog contents to
old `translog.xxx` fields.

Signed-off-by: Maksim Strutovskii <strutovsky.m.a@gmail.com>

* refactor: use ModelTestCase in tests for json serialization/deserialization

Signed-off-by: Maksim Strutovskii <strutovsky.m.a@gmail.com>

---------

Signed-off-by: Maksim Strutovskii <strutovsky.m.a@gmail.com>
(cherry picked from commit 1323796)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@reta reta merged commit ccb59f5 into 2.x Jun 28, 2023
@github-actions github-actions bot deleted the backport/backport-518-to-2.x branch June 28, 2023 19:50
@BrendonFaleiro BrendonFaleiro mentioned this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant