-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[BUG] The /{index}/_recovery API returns responses in a non-standard format(using camelCase). #16334
Copy link
Copy link
Open
Labels
OtherStorage:SnapshotsbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
The /{index}/_recovery API returns the following response.
The field names isSearchableSnapshot, remoteStoreIndexShallowCopy, sourceRemoteStoreRepository and sourceRemoteTranslogRepository are in non-standard format(using camelCase).
{
"test_index": {
"shards": [
{
"id": 0,
"type": "SNAPSHOT",
"stage": "DONE",
"primary": true,
"start_time_in_millis": 1728835477686,
"stop_time_in_millis": 1728835477725,
"total_time_in_millis": 39,
"source": {
"repository": "test-repository",
"snapshot": "6",
"version": "2.17.0",
"index": "test_index",
"restoreUUID": "n7wQKoo_RpiFVXJB5BuKDQ",
"isSearchableSnapshot": false,
"remoteStoreIndexShallowCopy": false,
"sourceRemoteStoreRepository": null,
"sourceRemoteTranslogRepository": null
},
"target": {
"id": "UtghWlpCT3akPM5wbVJxXA",
"host": "172.19.0.2",
"transport_address": "172.19.0.2:9300",
"ip": "172.19.0.2",
"name": "jdk21"
},
"index": {
"size": {
"total_in_bytes": 208,
"reused_in_bytes": 0,
"recovered_in_bytes": 208,
"percent": "100.0%"
},
"files": {
"total": 1,
"reused": 0,
"recovered": 1,
"percent": "100.0%"
},
"total_time_in_millis": 23,
"source_throttle_time_in_millis": 0,
"target_throttle_time_in_millis": 0
},
"translog": {
"recovered": 0,
"total": 0,
"percent": "100.0%",
"total_on_start": 0,
"total_time_in_millis": 7
},
"verify_index": {
"check_index_time_in_millis": 0,
"total_time_in_millis": 0
}
}
]
}
}
Source code is also implemented in CamelCase.
https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/cluster/routing/RecoverySource.java#L413-L421
Related component
Other
To Reproduce
- Restore snapshot.
- Access /{index}/_recovery API.
Expected behavior
API must be returned in standard format.
Additional Details
Plugins
None
Screenshots
None
Host/Environment (please complete the following information):
- OpenSearch 2.17.0 on docker
Additional context
opensearch-project/opensearch-api-specification#611 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
OtherStorage:SnapshotsbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Type
Projects
Status
🆕 New