Skip to content

Commit dab1b8e

Browse files
committed
[DOCS] Skip synced flush docs tests (#49986)
The current snippets in the synced flush docs can cause conflicts with other background syncs, such as the global checkpoint sync or retention lease sync, in the docs tests. This skips tests for those snippets to avoid conflicts.
1 parent 8dad9b9 commit dab1b8e

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

docs/reference/indices/synced-flush.asciidoc

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Performs a synced flush on one or more indices.
1010
--------------------------------------------------
1111
POST /twitter/_flush/synced
1212
--------------------------------------------------
13-
// TEST[setup:twitter]
13+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]
1414

1515

1616
[[synced-flush-api-request]]
@@ -80,7 +80,7 @@ section of the shard stats returned by the <<indices-stats,indices stats>> API:
8080
--------------------------------------------------
8181
GET /twitter/_stats?filter_path=**.commit&level=shards <1>
8282
--------------------------------------------------
83-
// TEST[s/^/PUT twitter\nPOST twitter\/_flush\/synced\n/]
83+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]
8484

8585
<1> `filter_path` is used to reduce the verbosity of the response, but is entirely optional
8686

@@ -116,10 +116,7 @@ The API returns the following response:
116116
}
117117
}
118118
--------------------------------------------------
119-
// TESTRESPONSE[s/"id" : "3M3zkw2GHMo2Y4h4\/KFKCg=="/"id": $body.indices.twitter.shards.0.0.commit.id/]
120-
// TESTRESPONSE[s/"translog_uuid" : "hnOG3xFcTDeoI_kvvvOdNA"/"translog_uuid": $body.indices.twitter.shards.0.0.commit.user_data.translog_uuid/]
121-
// TESTRESPONSE[s/"history_uuid" : "XP7KDJGiS1a2fHYiFL5TXQ"/"history_uuid": $body.indices.twitter.shards.0.0.commit.user_data.history_uuid/]
122-
// TESTRESPONSE[s/"sync_id" : "AVvFY-071siAOuFGEO9P"/"sync_id": $body.indices.twitter.shards.0.0.commit.user_data.sync_id/]
119+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]
123120
<1> the `sync id` marker
124121

125122
NOTE: The `sync_id` marker is removed as soon as the shard is flushed again, and
@@ -172,7 +169,7 @@ A replica shard failed to sync-flush.
172169
----
173170
POST /kimchy/_flush/synced
174171
----
175-
// TEST[s/^/PUT kimchy\n/]
172+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]
176173

177174

178175
[[synced-flush-api-multi-ex]]
@@ -182,8 +179,7 @@ POST /kimchy/_flush/synced
182179
--------------------------------------------------
183180
POST /kimchy,elasticsearch/_flush/synced
184181
--------------------------------------------------
185-
// TEST[s/^/PUT elasticsearch\n/]
186-
// TEST[continued]
182+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]
187183

188184

189185
[[synced-flush-api-all-ex]]
@@ -193,7 +189,7 @@ POST /kimchy,elasticsearch/_flush/synced
193189
--------------------------------------------------
194190
POST /_flush/synced
195191
--------------------------------------------------
196-
// TEST[setup:twitter]
192+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]
197193

198194
The response contains details about how many shards were successfully
199195
sync-flushed and information about any failure.
@@ -217,12 +213,12 @@ successfully sync-flushed:
217213
}
218214
}
219215
--------------------------------------------------
220-
// TESTRESPONSE[s/"successful": 2/"successful": 1/]
216+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]
221217

222218
The following response indicates one shard group failed
223219
due to pending operations:
224220

225-
[source,js]
221+
[source,console-result]
226222
--------------------------------------------------
227223
{
228224
"_shards": {
@@ -243,13 +239,13 @@ due to pending operations:
243239
}
244240
}
245241
--------------------------------------------------
246-
// NOTCONSOLE
242+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]
247243

248244
Sometimes the failures are specific to a shard replica. The copies that failed
249245
will not be eligible for fast recovery but those that succeeded still will be.
250246
This case is reported as follows:
251247

252-
[source,js]
248+
[source,console-result]
253249
--------------------------------------------------
254250
{
255251
"_shards": {
@@ -278,4 +274,4 @@ This case is reported as follows:
278274
}
279275
}
280276
--------------------------------------------------
281-
// NOTCONSOLE
277+
// TEST[skip: Synced flush can conflict with scheduled flushes in doc tests]

0 commit comments

Comments
 (0)