diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 431899e37a..aa2d2d6444 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -40698,7 +40698,7 @@ "snapshot" ], "summary": "Get the snapshot status", - "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.\n\n## Required authorization\n\n* Cluster privileges: `monitor_snapshot`\n", + "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nNote that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster.\nLoading the stats from the repository is an expensive operation (see the WARNING below).\nTherefore the stats values for such shards will be -1 even though the \"stage\" value will be \"DONE\", in order to minimize latency.\nA \"description\" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid.\nConsequently, the total stats for the index will be less than expected due to the missing values from these shards.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.\n\n## Required authorization\n\n* Cluster privileges: `monitor_snapshot`\n", "operationId": "snapshot-status", "parameters": [ { @@ -40723,7 +40723,7 @@ "snapshot" ], "summary": "Get the snapshot status", - "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.\n\n## Required authorization\n\n* Cluster privileges: `monitor_snapshot`\n", + "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nNote that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster.\nLoading the stats from the repository is an expensive operation (see the WARNING below).\nTherefore the stats values for such shards will be -1 even though the \"stage\" value will be \"DONE\", in order to minimize latency.\nA \"description\" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid.\nConsequently, the total stats for the index will be less than expected due to the missing values from these shards.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.\n\n## Required authorization\n\n* Cluster privileges: `monitor_snapshot`\n", "operationId": "snapshot-status-1", "parameters": [ { @@ -40751,7 +40751,7 @@ "snapshot" ], "summary": "Get the snapshot status", - "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.\n\n## Required authorization\n\n* Cluster privileges: `monitor_snapshot`\n", + "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nNote that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster.\nLoading the stats from the repository is an expensive operation (see the WARNING below).\nTherefore the stats values for such shards will be -1 even though the \"stage\" value will be \"DONE\", in order to minimize latency.\nA \"description\" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid.\nConsequently, the total stats for the index will be less than expected due to the missing values from these shards.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.\n\n## Required authorization\n\n* Cluster privileges: `monitor_snapshot`\n", "operationId": "snapshot-status-2", "parameters": [ { @@ -107907,8 +107907,14 @@ }, "examples": { "SnapshotStatusResponseExample1": { + "summary": "All shard stats present", "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. The response contains detailed status information for `snapshot_2` in the `my_repository` repository.\n", "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"SUCCESS\",\n \"include_global_state\" : false,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326691,\n \"time_in_millis\" : 205\n },\n \"indices\" : {\n \"index_1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n }\n }\n }\n }\n }\n }\n ]\n}" + }, + "SnapshotStatusResponseExample2": { + "summary": "Missing shard stats", + "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. Note that in this example the stats for `index-2` shard `0` are missing, with explanatory details provided in the `description` field.\n", + "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"STARTED\",\n \"include_global_state\" : true,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 2\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674327,\n \"time_in_millis\" : 189\n },\n \"indices\" : {\n \"index-1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 0,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"STARTED\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"node\" : \"VJzy6aKJSVKwcfjIFBPXxw\"\n }\n }\n },\n \"index-2\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"total\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"total\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"description\" : \"Snapshot shard stats missing from a currently running snapshot due to a node leaving the cluster after completing the shard snapshot; retry once the snapshot has completed to load all shard stats from the repository.\"\n }\n }\n }\n }\n }\n ]\n}" } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index 83033811c9..18c65715b5 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -21831,7 +21831,7 @@ "stability": "stable" } }, - "description": "Get the snapshot status.\nGet a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", + "description": "Get the snapshot status.\nGet a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nNote that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster.\nLoading the stats from the repository is an expensive operation (see the WARNING below).\nTherefore the stats values for such shards will be -1 even though the \"stage\" value will be \"DONE\", in order to minimize latency.\nA \"description\" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid.\nConsequently, the total stats for the index will be less than expected due to the missing values from these shards.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", "docId": "snapshot-status", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-status", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-status-api.html", @@ -247956,7 +247956,7 @@ "body": { "kind": "no_body" }, - "description": "Get the snapshot status.\nGet a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", + "description": "Get the snapshot status.\nGet a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nNote that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster.\nLoading the stats from the repository is an expensive operation (see the WARNING below).\nTherefore the stats values for such shards will be -1 even though the \"stage\" value will be \"DONE\", in order to minimize latency.\nA \"description\" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid.\nConsequently, the total stats for the index will be less than expected due to the missing values from these shards.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", "examples": { "SnapshotStatusRequestExample1": { "alternatives": [ @@ -248048,7 +248048,7 @@ } } ], - "specLocation": "snapshot/status/SnapshotStatusRequest.ts#L24-L90" + "specLocation": "snapshot/status/SnapshotStatusRequest.ts#L24-L96" }, { "kind": "response", @@ -248074,7 +248074,13 @@ "examples": { "SnapshotStatusResponseExample1": { "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. The response contains detailed status information for `snapshot_2` in the `my_repository` repository.\n", + "summary": "All shard stats present", "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"SUCCESS\",\n \"include_global_state\" : false,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326691,\n \"time_in_millis\" : 205\n },\n \"indices\" : {\n \"index_1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n }\n }\n }\n }\n }\n }\n ]\n}" + }, + "SnapshotStatusResponseExample2": { + "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. Note that in this example the stats for `index-2` shard `0` are missing, with explanatory details provided in the `description` field.\n", + "summary": "Missing shard stats", + "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"STARTED\",\n \"include_global_state\" : true,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 2\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674327,\n \"time_in_millis\" : 189\n },\n \"indices\" : {\n \"index-1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 0,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"STARTED\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"node\" : \"VJzy6aKJSVKwcfjIFBPXxw\"\n }\n }\n },\n \"index-2\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"total\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"total\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"description\" : \"Snapshot shard stats missing from a currently running snapshot due to a node leaving the cluster after completing the shard snapshot; retry once the snapshot has completed to load all shard stats from the repository.\"\n }\n }\n }\n }\n }\n ]\n}" } }, "name": { diff --git a/specification/snapshot/status/SnapshotStatusRequest.ts b/specification/snapshot/status/SnapshotStatusRequest.ts index 613025958b..07c16b2e0a 100644 --- a/specification/snapshot/status/SnapshotStatusRequest.ts +++ b/specification/snapshot/status/SnapshotStatusRequest.ts @@ -32,6 +32,12 @@ import { Duration } from '@_types/Time' * This usage is preferred. * If needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running. * + * Note that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster. + * Loading the stats from the repository is an expensive operation (see the WARNING below). + * Therefore the stats values for such shards will be -1 even though the "stage" value will be "DONE", in order to minimize latency. + * A "description" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid. + * Consequently, the total stats for the index will be less than expected due to the missing values from these shards. + * * WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. * The API requires a read from the repository for each shard in each snapshot. * For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). diff --git a/specification/snapshot/status/examples/response/SnapshotStatusResponseExample1.yaml b/specification/snapshot/status/examples/response/SnapshotStatusResponseExample1.yaml index f32a140a16..2341624099 100644 --- a/specification/snapshot/status/examples/response/SnapshotStatusResponseExample1.yaml +++ b/specification/snapshot/status/examples/response/SnapshotStatusResponseExample1.yaml @@ -1,4 +1,4 @@ -# summary: +summary: All shard stats present description: > A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. The response contains detailed status information for `snapshot_2` in the `my_repository` repository. diff --git a/specification/snapshot/status/examples/response/SnapshotStatusResponseExample2.yaml b/specification/snapshot/status/examples/response/SnapshotStatusResponseExample2.yaml new file mode 100644 index 0000000000..35e3c431d6 --- /dev/null +++ b/specification/snapshot/status/examples/response/SnapshotStatusResponseExample2.yaml @@ -0,0 +1,132 @@ +summary: Missing shard stats +description: > + A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. + Note that in this example the stats for `index-2` shard `0` are missing, with explanatory details provided in the `description` field. +# type: response +# response_code: '' +value: |- + { + "snapshots" : [ + { + "snapshot" : "snapshot_2", + "repository" : "my_repository", + "uuid" : "lNeQD1SvTQCqqJUMQSwmGg", + "state" : "STARTED", + "include_global_state" : true, + "shards_stats" : { + "initializing" : 0, + "started" : 1, + "finalizing" : 0, + "done" : 1, + "failed" : 0, + "total" : 2 + }, + "stats" : { + "incremental" : { + "file_count" : 4, + "size_in_bytes" : 5412 + }, + "processed" : { + "file_count" : 2, + "size_in_bytes" : 658 + }, + "total" : { + "file_count" : 4, + "size_in_bytes" : 5412 + }, + "start_time_in_millis" : 1750452674327, + "time_in_millis" : 189 + }, + "indices" : { + "index-1" : { + "shards_stats" : { + "initializing" : 0, + "started" : 1, + "finalizing" : 0, + "done" : 0, + "failed" : 0, + "total" : 1 + }, + "stats" : { + "incremental" : { + "file_count" : 4, + "size_in_bytes" : 5412 + }, + "processed" : { + "file_count" : 2, + "size_in_bytes" : 658 + }, + "total" : { + "file_count" : 4, + "size_in_bytes" : 5412 + }, + "start_time_in_millis" : 1750452674379, + "time_in_millis" : 0 + }, + "shards" : { + "0" : { + "stage" : "STARTED", + "stats" : { + "incremental" : { + "file_count" : 4, + "size_in_bytes" : 5412 + }, + "processed" : { + "file_count" : 2, + "size_in_bytes" : 658 + }, + "total" : { + "file_count" : 4, + "size_in_bytes" : 5412 + }, + "start_time_in_millis" : 1750452674379, + "time_in_millis" : 0 + }, + "node" : "VJzy6aKJSVKwcfjIFBPXxw" + } + } + }, + "index-2" : { + "shards_stats" : { + "initializing" : 0, + "started" : 0, + "finalizing" : 0, + "done" : 1, + "failed" : 0, + "total" : 1 + }, + "stats" : { + "incremental" : { + "file_count" : 0, + "size_in_bytes" : 0 + }, + "total" : { + "file_count" : 0, + "size_in_bytes" : 0 + }, + "start_time_in_millis" : 0, + "time_in_millis" : 0 + }, + "shards" : { + "0" : { + "stage" : "DONE", + "stats" : { + "incremental" : { + "file_count" : -1, + "size_in_bytes" : -1 + }, + "total" : { + "file_count" : -1, + "size_in_bytes" : -1 + }, + "start_time_in_millis" : 0, + "time_in_millis" : 0 + }, + "description" : "Snapshot shard stats missing from a currently running snapshot due to a node leaving the cluster after completing the shard snapshot; retry once the snapshot has completed to load all shard stats from the repository." + } + } + } + } + } + ] + }