Skip to content

Commit 9184b4c

Browse files
authored
Add deprecation docs for cluster health HTTP code (#79451)
Documents the deprecation introduced in #78180 and adjusted in #79351.
1 parent 28eb464 commit 9184b4c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/reference/migration/migrate_7_16.asciidoc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,4 +267,30 @@ To avoid deprecation warnings, discontinue use of transient settings when modify
267267
your cluster settings through the `PUT _cluster/settings` REST API. When modifying cluster settings
268268
use only persistent settings.
269269
====
270+
271+
[discrete]
272+
[[breaking_716_cluster_deprecations]]
273+
==== Cluster deprecations
274+
275+
[[deprecate-cluster-health-408]]
276+
.Distinguishing cluster health timeout status by HTTP response code is now deprecated.
277+
[%collapsible]
278+
====
279+
*Details* +
280+
The <<cluster-health>> API includes options for waiting for certain health
281+
conditions to be satisfied. If the requested conditions are not satisfied
282+
within a timeout then {es} will send back a normal response including the field
283+
`"timed_out": true`. In earlier versions it would also use the HTTP response
284+
code `408 Request timeout` if the request timed out, and `200 OK` otherwise.
285+
The `408 Request timeout` response code is not appropriate for this situation
286+
and its use is deprecated. Future versions will use the response code `200 OK`
287+
for both cases.
288+
289+
*Impact* +
290+
Update your application to read the `"timed_out"` field of the response instead
291+
of the HTTP response code to determine whether the request timed out or not. To
292+
avoid deprecation warnings and opt into the future behaviour, include the query
293+
parameter `?return_200_for_cluster_health_timeout` in your request.
294+
====
295+
270296
// end::notable-breaking-changes[]

0 commit comments

Comments
 (0)