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

rename fields to snake case #17123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sachinda-git
Copy link

This pull request addresses issue #16334 by renaming the following fields in the SnapshotRecoverySource class to follow a standard snake_case naming convention:

isSearchableSnapshot → is_searchable_snapshot
remoteStoreIndexShallowCopy → remote_store_index_shallow_copy
sourceRemoteStoreRepository → source_remote_store_repository
sourceRemoteTranslogRepository → source_remote_translog_repository
The changes ensure consistency in field naming, improving clarity and alignment with API standards. All affected methods, constructors, and serialization logic have been updated accordingly.

Related Issues
Resolves #16334

Check List
Functionality includes testing: Updated relevant unit tests to reflect the changes.
API changes companion pull request created, if applicable.
Public documentation issue/PR created, if applicable.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

❌ Gradle check result for c4ef85b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

.field("remoteStoreIndexShallowCopy", remoteStoreIndexShallowCopy)
.field("sourceRemoteStoreRepository", sourceRemoteStoreRepository)
.field("sourceRemoteTranslogRepository", sourceRemoteTranslogRepository);
.field("is_searchable_snapshot", is_searchable_snapshot)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java variables should follow the lowerCamelCase convention, but when serialized in toXContent (as done on the left side of this line), these can be converted to lower_snake_case.

As @gbbafna pointed out here, since this is a change in API its considered a breaking change and would have to be targeted for OpenSearch 3.0. At the moment, OpenSearch 3.0 is the next planned release after OpenSearch 2.19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Other Storage:Snapshots
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[BUG] The /{index}/_recovery API returns responses in a non-standard format(using camelCase).
2 participants