[DOCS] Reformat shrink index API docs#46711
Merged
jrodewig merged 7 commits intoelastic:masterfrom Oct 4, 2019
jrodewig:shrink-index-api-reformat
Merged
[DOCS] Reformat shrink index API docs#46711jrodewig merged 7 commits intoelastic:masterfrom jrodewig:shrink-index-api-reformat
jrodewig merged 7 commits intoelastic:masterfrom
jrodewig:shrink-index-api-reformat
Conversation
Collaborator
|
Pinging @elastic/es-docs |
Collaborator
|
Pinging @elastic/es-core-features |
35 tasks
debadair
approved these changes
Oct 4, 2019
Contributor
debadair
left a comment
There was a problem hiding this comment.
A couple minor editorial comments, but other than that LGTM.
| In order to shrink an index, the index must be marked as read-only, and a | ||
| (primary or replica) copy of every shard in the index must be relocated to the | ||
| same node and have <<cluster-health,health>> `green`. | ||
| same node and have a <<cluster-health, cluster health>> status of `green`. |
Contributor
There was a problem hiding this comment.
This reads awkardly--the subject is "a copy of every shard", but the last clause is referring to the node status. I'd probably make this a list:
Before you can shrink an index:
- The index must be read-only.
- A copy of every shard in the index must reside on the same node.
- The <<cluster-health, cluster health>> status must be
green.
| same node and have <<cluster-health,health>> `green`. | ||
| same node and have a <<cluster-health, cluster health>> status of `green`. | ||
|
|
||
| These two conditions can be achieved with the following request: |
Contributor
There was a problem hiding this comment.
There are really three conditions.
Comment on lines
+70
to
+83
| Shrinking works as follows: | ||
|
|
||
| * First, it creates a new target index with the same definition as the source | ||
| index, but with a smaller number of primary shards. | ||
|
|
||
| * Then it hard-links segments from the source index into the target index. (If | ||
| the file system doesn't support hard-linking, then all segments are copied | ||
| into the new index, which is a much more time consuming process. Also if using | ||
| multiple data paths, shards on different data paths require a full copy of | ||
| segment files if they are not on the same disk since hardlinks don’t work across | ||
| disks) | ||
|
|
||
| * Finally, it recovers the target index as though it were a closed index which | ||
| had just been re-opened. |
Contributor
There was a problem hiding this comment.
Referring to "Shrinking" as "it" strikes me as odd. Maybe:
A shrink operation:
- Creates the target index...
- Hard links...
- Recovers the target index...
| ==== Wait For Active Shards | ||
|
|
||
| [[shrink-wait-active-shards]] | ||
| ===== Wait For active shards |
Contributor
Author
|
Thanks @debadair! |
This was referenced Oct 4, 2019
jrodewig
added a commit
that referenced
this pull request
Oct 4, 2019
jrodewig
added a commit
that referenced
this pull request
Oct 4, 2019
jrodewig
added a commit
that referenced
this pull request
Oct 4, 2019
jrodewig
added a commit
that referenced
this pull request
Dec 13, 2021
Reverts an anchor change from #46711. Previous versions of the docs use the `_shrinking_an_index` anchor for this section. Preserving that anchor will prevent doc build breaks in future releases.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Dec 13, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reformats the shrink API docs to align with the new API reference template.
Relates to #43765.