Skip to content

[DOCS] Reformat shrink index API docs#46711

Merged
jrodewig merged 7 commits intoelastic:masterfrom
jrodewig:shrink-index-api-reformat
Oct 4, 2019
Merged

[DOCS] Reformat shrink index API docs#46711
jrodewig merged 7 commits intoelastic:masterfrom
jrodewig:shrink-index-api-reformat

Conversation

@jrodewig
Copy link
Copy Markdown
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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. v8.0.0 v7.3.0 v7.4.0 v7.5.0 labels Sep 13, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-docs

@elasticmachine
Copy link
Copy Markdown
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 AmandaFuisz, debadair and szabosteve and removed request for AmandaFuisz October 3, 2019 20:06
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >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