Skip to content

Commit 7c589fe

Browse files
committed
try without commnets
1 parent 2d66f90 commit 7c589fe

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

docs/reference/data-streams/failure-store.asciidoc

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ PUT _index_template/my-index-template
4040
"index_patterns": ["my-datastream-*"],
4141
"data_stream": { },
4242
"template": {
43-
"data_stream_options": { // <1>
43+
"data_stream_options": { <1>
4444
"failure_store": {
45-
"enabled": true // <2>
45+
"enabled": true <2>
4646
}
4747
}
4848
}
@@ -65,7 +65,7 @@ To modify an existing data stream's options, use the https://www.elastic.co/docs
6565
PUT _data_stream/my-datastream-existing/_options
6666
{
6767
"failure_store": {
68-
"enabled": true // <1>
68+
"enabled": true <1>
6969
}
7070
}
7171
----
@@ -78,7 +78,7 @@ The failure store redirection can be disabled using this API as well. When the f
7878
PUT _data_stream/my-datastream-existing/_options
7979
{
8080
"failure_store": {
81-
"enabled": false // <1>
81+
"enabled": false <1>
8282
}
8383
}
8484
----
@@ -95,7 +95,7 @@ If you have a large number of existing data streams you may want to enable their
9595
PUT _cluster/settings
9696
{
9797
"persistent" : {
98-
"data_streams.failure_store.enabled" : [ "my-datastream-*", "logs-*" ] // <1>
98+
"data_streams.failure_store.enabled" : [ "my-datastream-*", "logs-*" ] <1>
9999
}
100100
}
101101
----
@@ -108,7 +108,7 @@ Matching data streams will ignore this configuration if the failure store is exp
108108
PUT _data_stream/my-datastream-1/_options
109109
{
110110
"failure_store": {
111-
"enabled": false // <1>
111+
"enabled": false <1>
112112
}
113113
}
114114
----
@@ -138,22 +138,22 @@ Here we have a bulk operation that sends two documents. Both are writing to the
138138
----
139139
POST my-datastream-new/_bulk
140140
{"create":{}}
141-
{"@timestamp": "2025-05-01T00:00:00Z", "id": 1234} // <1>
141+
{"@timestamp": "2025-05-01T00:00:00Z", "id": 1234} <1>
142142
{"create":{}}
143-
{"@timestamp": "2025-05-01T00:00:00Z", "id": "invalid_text"} // <2>
143+
{"@timestamp": "2025-05-01T00:00:00Z", "id": "invalid_text"} <2>
144144
----
145145
<1> A correctly formatted document.
146146
<2> Invalid document that cannot be parsed using the current mapping.
147147

148148
[source,console-result]
149149
----
150150
{
151-
"errors": false, // <1>
151+
"errors": false, <1>
152152
"took": 400,
153153
"items": [
154154
{
155155
"create": {
156-
"_index": ".ds-my-datastream-new-2025.05.01-000001", // <2>
156+
"_index": ".ds-my-datastream-new-2025.05.01-000001", <2>
157157
"_id": "YUvQipYB_ZAKuDfZRosB",
158158
"_version": 1,
159159
"result": "created",
@@ -169,7 +169,7 @@ POST my-datastream-new/_bulk
169169
},
170170
{
171171
"create": {
172-
"_index": ".fs-my-datastream-new-2025.05.01-000002", // <3>
172+
"_index": ".fs-my-datastream-new-2025.05.01-000002", <3>
173173
"_id": "lEu8jZYB_ZAKuDfZNouU",
174174
"_version": 1,
175175
"result": "created",
@@ -180,7 +180,7 @@ POST my-datastream-new/_bulk
180180
},
181181
"_seq_no": 10,
182182
"_primary_term": 1,
183-
"failure_store": "used", // <4>
183+
"failure_store": "used", <4>
184184
"status": 201
185185
}
186186
}
@@ -197,7 +197,7 @@ If the document was redirected to a data stream's failure store due to a problem
197197
[source,console-result]
198198
----
199199
{
200-
"_index": ".fs-my-datastream-new-2025.05.01-000002", // <1>
200+
"_index": ".fs-my-datastream-new-2025.05.01-000002", <1>
201201
"_id": "lEu8jZYB_ZAKuDfZNouU",
202202
"_version": 1,
203203
"result": "created",
@@ -208,7 +208,7 @@ If the document was redirected to a data stream's failure store due to a problem
208208
},
209209
"_seq_no": 11,
210210
"_primary_term": 1,
211-
"failure_store": "used" // <2>
211+
"failure_store": "used" <2>
212212
}
213213
----
214214
<1> The document for this index operation was sent to the failure store's write index.
@@ -220,7 +220,7 @@ If the document could have been redirected to a data stream's failure store but
220220
----
221221
{
222222
"error": {
223-
"root_cause": [ // <1>
223+
"root_cause": [ <1>
224224
{
225225
"type": "document_parsing_exception",
226226
"reason": "[1:53] failed to parse field [id] of type [long] in document with id 'Y0vQipYB_ZAKuDfZR4sR'. Preview of field's value: 'invalid_text'"
@@ -232,9 +232,9 @@ If the document could have been redirected to a data stream's failure store but
232232
"type": "illegal_argument_exception",
233233
"reason": "For input string: \"invalid_text\""
234234
},
235-
"failure_store": "not_enabled" // <2>
235+
"failure_store": "not_enabled" <2>
236236
},
237-
"status": 400 // <3>
237+
"status": 400 <3>
238238
}
239239
----
240240
<1> The failure is returned to the client as normal when the failure store is not enabled.
@@ -249,17 +249,17 @@ If the document was redirected to a data stream's failure store but that failed
249249
"error": {
250250
"root_cause": [
251251
{
252-
"type": "document_parsing_exception", // <1>
252+
"type": "document_parsing_exception", <1>
253253
"reason": "[1:53] failed to parse field [id] of type [long] in document with id 'Y0vQipYB_ZAKuDfZR4sR'. Preview of field's value: 'invalid_text'",
254254
"suppressed": [
255255
{
256-
"type": "cluster_block_exception", // <2>
256+
"type": "cluster_block_exception", <2>
257257
"reason": "index [.fs-my-datastream-2025.05.01-000002] blocked by: [FORBIDDEN/5/index read-only (api)];"
258258
}
259259
]
260260
}
261261
],
262-
"type": "document_parsing_exception", // <3>
262+
"type": "document_parsing_exception", <3>
263263
"reason": "[1:53] failed to parse field [id] of type [long] in document with id 'Y0vQipYB_ZAKuDfZR4sR'. Preview of field's value: 'invalid_text'",
264264
"caused_by": {
265265
"type": "illegal_argument_exception",
@@ -271,9 +271,9 @@ If the document was redirected to a data stream's failure store but that failed
271271
"reason": "index [.fs-my-datastream-2025.05.01-000002] blocked by: [FORBIDDEN/5/index read-only (api)];"
272272
}
273273
],
274-
"failure_store": "failed" // <4>
274+
"failure_store": "failed" <4>
275275
},
276-
"status": 400 // <5>
276+
"status": 400 <5>
277277
}
278278
----
279279
<1> The root cause of the problem was a mapping mismatch.
@@ -309,7 +309,7 @@ To indicate that the search should be performed on failure store data, use the <
309309
----
310310
POST _query?format=txt
311311
{
312-
"query": """FROM my-datastream::failures | DROP error.stack_trace | LIMIT 1""" // <1>
312+
"query": """FROM my-datastream::failures | DROP error.stack_trace | LIMIT 1""" <1>
313313
}
314314
----
315315
<1> We drop the `error.stack_trace` field here just to keep the example free of newlines.
@@ -461,14 +461,14 @@ PUT _ingest/pipeline/my-datastream-example-pipeline
461461
{
462462
"processors": [
463463
{
464-
"set": { // <1>
464+
"set": { <1>
465465
"override": false,
466466
"field": "@timestamp",
467467
"copy_from": "_ingest.timestamp"
468468
}
469469
},
470470
{
471-
"set": { // <2>
471+
"set": { <2>
472472
"field": "published",
473473
"copy_from": "data"
474474
}
@@ -564,15 +564,15 @@ GET my-datastream-ingest::failures/_search
564564
"_score": 1,
565565
"_source": {
566566
"@timestamp": "2025-05-09T20:31:13.759Z",
567-
"document": { // <1>
567+
"document": { <1>
568568
"index": "my-datastream-ingest",
569569
"source": {
570570
"random": 42
571571
}
572572
},
573573
"error": {
574574
"type": "illegal_argument_exception",
575-
"message": "field [data] not present as part of path [data]", // <2>
575+
"message": "field [data] not present as part of path [data]", <2>
576576
"stack_trace": """j.l.IllegalArgumentException: field [data] not present as part of path [data]
577577
at o.e.i.IngestDocument.getFieldValue(IngestDocument.java:202)
578578
at o.e.i.c.SetProcessor.execute(SetProcessor.java:86)
@@ -601,7 +601,7 @@ Building on the example above, we send a document that has a text value where we
601601
----
602602
POST my-datastream-ingest/_doc
603603
{
604-
"data": "this field is invalid" // <1>
604+
"data": "this field is invalid" <1>
605605
}
606606
----
607607
<1> The mappings above expect this field to have been a numeric value.
@@ -620,7 +620,7 @@ POST my-datastream-ingest/_doc
620620
},
621621
"_seq_no": 0,
622622
"_primary_term": 1,
623-
"failure_store": "used" // <1>
623+
"failure_store": "used" <1>
624624
}
625625
----
626626
<1> The document failed and was sent to the failure store.
@@ -655,7 +655,7 @@ GET my-datastream-ingest::failures/_search
655655
"_score": 1,
656656
"_source": {
657657
"@timestamp": "2025-05-09T20:55:38.943Z",
658-
"document": { // <1>
658+
"document": { <1>
659659
"id": "sHTVtpYBwrYNjPmaEdB5",
660660
"index": "my-datastream-ingest",
661661
"source": {
@@ -665,7 +665,7 @@ GET my-datastream-ingest::failures/_search
665665
}
666666
},
667667
"error": {
668-
"type": "document_parsing_exception", // <2>
668+
"type": "document_parsing_exception", <2>
669669
"message": "[1:91] failed to parse field [published] of type [long] in document with id 'sHTVtpYBwrYNjPmaEdB5'. Preview of field's value: 'this field is invalid'",
670670
"stack_trace": """o.e.i.m.DocumentParsingException: [1:91] failed to parse field [published] of type [long] in document with id 'sHTVtpYBwrYNjPmaEdB5'. Preview of field's value: 'this field is invalid'
671671
at o.e.i.m.FieldMapper.rethrowAsDocumentParsingException(FieldMapper.java:241)
@@ -761,20 +761,20 @@ GET _data_stream/my-datastream
761761
"replicated": false,
762762
"rollover_on_write": false,
763763
"index_mode": "standard",
764-
"failure_store": { // <1>
764+
"failure_store": { <1>
765765
"enabled": true,
766766
"rollover_on_write": false,
767767
"indices": [
768768
{
769769
"index_name": ".fs-my-datastream-2025.05.05-000002",
770770
"index_uuid": "oYS2WsjkSKmdazWuS4RP9Q",
771-
"managed_by": "Data stream lifecycle" // <2>
771+
"managed_by": "Data stream lifecycle" <2>
772772
}
773773
],
774774
"lifecycle": {
775775
"enabled": true,
776-
"effective_retention": "30d", // <3>
777-
"retention_determined_by": "default_failures_retention" // <4>
776+
"effective_retention": "30d", <3>
777+
"retention_determined_by": "default_failures_retention" <4>
778778
}
779779
}
780780
}
@@ -810,9 +810,9 @@ You can also specify the failure store retention period for a data stream on its
810810
PUT _data_stream/my-datastream/_options
811811
{
812812
"failure_store": {
813-
"enabled": true, // <1>
813+
"enabled": true, <1>
814814
"lifecycle": {
815-
"data_retention": "10d" // <2>
815+
"data_retention": "10d" <2>
816816
}
817817
}
818818
}
@@ -832,17 +832,17 @@ POST _data_stream/_modify
832832
{
833833
"actions":[
834834
{
835-
"remove_backing_index": { // <1>
835+
"remove_backing_index": { <1>
836836
"data_stream": "my-datastream",
837-
"index": ".fs-my-datastream-2025.05.05-000002", // <2>
838-
"failure_store": true // <3>
837+
"index": ".fs-my-datastream-2025.05.05-000002", <2>
838+
"failure_store": true <3>
839839
}
840840
},
841841
{
842-
"add_backing_index": { // <4>
842+
"add_backing_index": { <4>
843843
"data_stream": "my-datastream",
844-
"index": "restored-failure-index", // <5>
845-
"failure_store": true // <6>
844+
"index": "restored-failure-index", <5>
845+
"failure_store": true <6>
846846
}
847847
}
848848
]

0 commit comments

Comments
 (0)