-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core: Added
_shards
header to all write responses.
The header indicates to how many shard copies (primary and replicas shards) a write was supposed to go to, to how many shard copies to write succeeded and potentially captures shard failures if writing into a replica shard fails. For async writes it also includes the number of shards a write is still pending. Closes #7994
- Loading branch information
Showing
42 changed files
with
982 additions
and
380 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
"Delete check shard header": | ||
|
||
- do: | ||
indices.create: | ||
index: foobar | ||
body: | ||
settings: | ||
number_of_shards: "1" | ||
number_of_replicas: "0" | ||
|
||
- do: | ||
cluster.health: | ||
wait_for_status: green | ||
|
||
- do: | ||
index: | ||
index: foobar | ||
type: baz | ||
id: 1 | ||
body: { foo: bar } | ||
|
||
- do: | ||
delete: | ||
index: foobar | ||
type: baz | ||
id: 1 | ||
|
||
- match: { _index: foobar } | ||
- match: { _type: baz } | ||
- match: { _id: "1"} | ||
- match: { _version: 2} | ||
- match: { _shards.total: 1} | ||
- match: { _shards.successful: 1} | ||
- match: { _shards.failed: 0} | ||
- is_false: _shards.pending |
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,56 @@ | ||
--- | ||
"Index check shard header": | ||
|
||
- do: | ||
indices.create: | ||
index: foobar1 | ||
body: | ||
settings: | ||
number_of_shards: "1" | ||
number_of_replicas: "0" | ||
|
||
|
||
- do: | ||
indices.create: | ||
index: foobar2 | ||
body: | ||
settings: | ||
number_of_shards: "1" | ||
number_of_replicas: "1" | ||
|
||
- do: | ||
cluster.health: | ||
wait_for_status: green | ||
|
||
- do: | ||
index: | ||
index: foobar1 | ||
type: baz | ||
id: 1 | ||
body: { foo: bar } | ||
|
||
- match: { _index: foobar1 } | ||
- match: { _type: baz } | ||
- match: { _id: "1"} | ||
- match: { _version: 1} | ||
- match: { _shards.total: 1} | ||
- match: { _shards.successful: 1} | ||
- match: { _shards.failed: 0} | ||
- is_false: _shards.pending | ||
|
||
- do: | ||
index: | ||
index: foobar2 | ||
type: baz | ||
id: 1 | ||
replication: async | ||
body: { foo: bar } | ||
|
||
- match: { _index: foobar2 } | ||
- match: { _type: baz } | ||
- match: { _id: "1"} | ||
- match: { _version: 1} | ||
- match: { _shards.total: 2} | ||
- match: { _shards.successful: 1} | ||
- match: { _shards.failed: 0} | ||
- match: { _shards.pending: 1} |
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,39 @@ | ||
--- | ||
"Update check shard header": | ||
|
||
- do: | ||
indices.create: | ||
index: foobar | ||
body: | ||
settings: | ||
number_of_shards: "1" | ||
number_of_replicas: "0" | ||
|
||
- do: | ||
cluster.health: | ||
wait_for_status: green | ||
|
||
- do: | ||
index: | ||
index: foobar | ||
type: baz | ||
id: 1 | ||
body: { foo: bar } | ||
|
||
- do: | ||
update: | ||
index: foobar | ||
type: baz | ||
id: 1 | ||
body: | ||
doc: | ||
foo: baz | ||
|
||
- match: { _index: foobar } | ||
- match: { _type: baz } | ||
- match: { _id: "1"} | ||
- match: { _version: 2} | ||
- match: { _shards.total: 1} | ||
- match: { _shards.successful: 1} | ||
- match: { _shards.failed: 0} | ||
- is_false: _shards.pending |
Oops, something went wrong.