Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Reformat shrink index API docs #46711

Merged
merged 7 commits into from
Oct 4, 2019
Merged

[DOCS] Reformat shrink index API docs #46711

merged 7 commits into from
Oct 4, 2019

Conversation

jrodewig
Copy link
Contributor

Reformats the shrink API docs to align with the new API reference template.

Relates to #43765.

@jrodewig jrodewig added >docs General docs changes :Data Management/Indices APIs APIs to create and manage indices and templates v8.0.0 v7.3.0 v7.4.0 v7.5.0 labels Sep 13, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@jrodewig jrodewig added v7.4.1 and removed v7.4.0 labels Sep 27, 2019
@jrodewig jrodewig requested review from debadair, AmandaFuisz and szabosteve and removed request for AmandaFuisz October 3, 2019 20:06
Copy link
Contributor

@debadair debadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e6f9b25.


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`.

These two conditions can be achieved with the following request:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are really three conditions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e6f9b25.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referring to "Shrinking" as "it" strikes me as odd. Maybe:

A shrink operation:

  1. Creates the target index...
  2. Hard links...
  3. Recovers the target index...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e6f9b25.

==== Wait For Active Shards

[[shrink-wait-active-shards]]
===== Wait For active shards
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercase for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e6f9b25.

@jrodewig
Copy link
Contributor Author

jrodewig commented Oct 4, 2019

Thanks @debadair!

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
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >docs General docs changes v7.3.0 v7.4.1 v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants