-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Backport of #43752 for 7.x.
- Loading branch information
Showing
7 changed files
with
253 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
x-pack/plugin/src/test/resources/rest-api-spec/test/indices.freeze/20_stats.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
setup: | ||
- do: | ||
indices.create: | ||
index: test | ||
- do: | ||
cluster.health: | ||
wait_for_no_initializing_shards: true | ||
|
||
--- | ||
"Translog stats on frozen indices": | ||
- skip: | ||
version: " - 7.2.99" | ||
reason: "frozen indices have translog stats starting version 7.3.0" | ||
|
||
- do: | ||
index: | ||
index: test | ||
id: 1 | ||
body: { "foo": "bar" } | ||
|
||
- do: | ||
index: | ||
index: test | ||
id: 2 | ||
body: { "foo": "bar" } | ||
|
||
- do: | ||
index: | ||
index: test | ||
id: 3 | ||
body: { "foo": "bar" } | ||
|
||
- do: | ||
indices.stats: | ||
metric: [ translog ] | ||
- match: { indices.test.primaries.translog.operations: 3 } | ||
- match: { indices.test.primaries.translog.uncommitted_operations: 3 } | ||
|
||
# freeze index | ||
- do: | ||
indices.freeze: | ||
index: test | ||
wait_for_active_shards: 1 | ||
- is_true: acknowledged | ||
|
||
- do: | ||
indices.stats: | ||
metric: [ translog ] | ||
- match: { indices.test.primaries.translog.operations: 3 } | ||
- match: { indices.test.primaries.translog.uncommitted_operations: 0 } | ||
|
||
# unfreeze index | ||
- do: | ||
indices.freeze: | ||
index: test | ||
wait_for_active_shards: 1 | ||
- is_true: acknowledged | ||
|
||
- do: | ||
indices.stats: | ||
metric: [ translog ] | ||
- match: { indices.test.primaries.translog.operations: 3 } | ||
- match: { indices.test.primaries.translog.uncommitted_operations: 0 } |