Skip to content

Commit 1fad334

Browse files
authored
Update get snapshot status API doc (#111240) (#111296)
Make it clear that this API should be used only if the detailed shard info is needed and only on ongoing snapshots. Remove incorrectly mentioned `STATE` value.
1 parent 2a83269 commit 1fad334

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

docs/reference/snapshot-restore/apis/get-snapshot-status-api.asciidoc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<titleabbrev>Get snapshot status</titleabbrev>
55
++++
66

7-
Retrieves a detailed description of the current state for each shard participating in the snapshot.
7+
Retrieves a detailed description of the current state for each shard participating in the snapshot. Note that this API should only be used to obtain detailed shard-level information for ongoing snapshots. If this detail is not needed, or you want to obtain information about one or more existing snapshots, use the <<get-snapshot-api,get snapshot API>>.
88

99
////
1010
[source,console]
@@ -172,13 +172,8 @@ Indicates the current snapshot state.
172172
`STARTED`::
173173
The snapshot is currently running.
174174
175-
`PARTIAL`::
176-
The global cluster state was stored, but data of at least one shard was not stored successfully.
177-
The <<get-snapshot-api-response-failures,`failures`>> section of the response contains more detailed information about shards
178-
that were not processed correctly.
179-
180175
`SUCCESS`::
181-
The snapshot finished and all shards were stored successfully.
176+
The snapshot completed.
182177
====
183178
--
184179

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,7 @@ private void loadRepositoryData(
329329
final SnapshotsInProgress.State state = switch (snapshotInfo.state()) {
330330
case FAILED -> SnapshotsInProgress.State.FAILED;
331331
case SUCCESS, PARTIAL ->
332-
// Translating both PARTIAL and SUCCESS to SUCCESS for now
333-
// TODO: add the differentiation on the metadata level in the next major release
332+
// Both of these means the snapshot has completed.
334333
SnapshotsInProgress.State.SUCCESS;
335334
default -> throw new IllegalArgumentException("Unexpected snapshot state " + snapshotInfo.state());
336335
};

0 commit comments

Comments
 (0)