-
Notifications
You must be signed in to change notification settings - Fork 190
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
fix: add missing translog sync interval option to index settings #518
Merged
reta
merged 3 commits into
opensearch-project:main
from
Mstrutov:fix/add-translog-sync-interval-to-index-settings
Jun 28, 2023
Merged
fix: add missing translog sync interval option to index settings #518
reta
merged 3 commits into
opensearch-project:main
from
Mstrutov:fix/add-translog-sync-interval-to-index-settings
Jun 28, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mstrutov
requested review from
reta,
Bukhtawar,
dblock,
szczepanczykd,
madhusudhankonda,
saratvemulapalli and
VachaShah
as code owners
June 6, 2023 04:50
Mstrutov
force-pushed
the
fix/add-translog-sync-interval-to-index-settings
branch
2 times, most recently
from
June 6, 2023 04:59
5ecc6c7
to
6ba68d8
Compare
reta
reviewed
Jun 6, 2023
java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java
Outdated
Show resolved
Hide resolved
reta
reviewed
Jun 7, 2023
java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java
Outdated
Show resolved
Hide resolved
reta
reviewed
Jun 7, 2023
java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java
Outdated
Show resolved
Hide resolved
reta
previously approved these changes
Jun 7, 2023
Mstrutov
force-pushed
the
fix/add-translog-sync-interval-to-index-settings
branch
from
June 8, 2023 12:10
f849a4e
to
ff2f996
Compare
Mstrutov
force-pushed
the
fix/add-translog-sync-interval-to-index-settings
branch
from
June 8, 2023 12:28
ff2f996
to
410e08f
Compare
reta
previously approved these changes
Jun 8, 2023
dblock
previously approved these changes
Jun 12, 2023
java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java
Outdated
Show resolved
Hide resolved
Mstrutov
force-pushed
the
fix/add-translog-sync-interval-to-index-settings
branch
2 times, most recently
from
June 13, 2023 05:35
8d06598
to
891e0fe
Compare
dblock
approved these changes
Jun 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some nice to have's but this is good by me. Up to you if you want to address them.
java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java
Outdated
Show resolved
Hide resolved
java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java
Outdated
Show resolved
Hide resolved
dblock
previously approved these changes
Jun 13, 2023
Mstrutov
force-pushed
the
fix/add-translog-sync-interval-to-index-settings
branch
2 times, most recently
from
June 15, 2023 07:36
b7d50ca
to
86078bb
Compare
dblock
previously approved these changes
Jun 20, 2023
dblock
previously approved these changes
Jun 26, 2023
LGTM! @reta? |
reta
previously approved these changes
Jun 27, 2023
reta
reviewed
Jun 27, 2023
reta
reviewed
Jun 27, 2023
VachaShah
previously approved these changes
Jun 27, 2023
Mstrutov
force-pushed
the
fix/add-translog-sync-interval-to-index-settings
branch
from
June 28, 2023 10:51
4484d87
to
a58b899
Compare
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 <[email protected]>
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 <[email protected]>
…zation Signed-off-by: Maksim Strutovskii <[email protected]>
Mstrutov
force-pushed
the
fix/add-translog-sync-interval-to-index-settings
branch
from
June 28, 2023 10:53
a58b899
to
e0f63b5
Compare
reta
approved these changes
Jun 28, 2023
VachaShah
approved these changes
Jun 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Mstrutov!
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jun 28, 2023
* 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 <[email protected]> * 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 <[email protected]> * refactor: use ModelTestCase in tests for json serialization/deserialization Signed-off-by: Maksim Strutovskii <[email protected]> --------- Signed-off-by: Maksim Strutovskii <[email protected]> (cherry picked from commit 1323796) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta
pushed a commit
that referenced
this pull request
Jun 28, 2023
… (#544) * 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. * 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. * refactor: use ModelTestCase in tests for json serialization/deserialization --------- (cherry picked from commit 1323796) Signed-off-by: Maksim Strutovskii <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Now we can set translog sync interval option via client.
Additionally, server response contains separate
translog
object, which cannot be deserialized by present translog option deserializers.It looks like this:
Therefore, a corresponding
Translog
class is introduced, similarly to how it is done for theblocks
property.Issues Resolved
Closes #307
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.