OpenSearch/docs/reference/indices
Tal Levy 1e0fcebfe1
update rollover to leverage write-alias semantics (#32216)
Rollover should not swap aliases when `is_write_index` is set to `true`.
Instead, both the new and old indices should have the rollover alias,
with the newly created index as the new write index

Updates Rollover to leverage the ability to preserve aliases and swap which is the write index.

Historically, Rollover would swap which index had the designated alias for writing documents against. This required users to keep a separate read-alias that enabled reading against both rolled over and newly created indices, whiles the write-alias was being re-assigned at every rollover.

With the ability for aliases to designate a write index, Rollover can be a bit more flexible with its use of aliases.

Updates include:

- Rollover validates that the target alias has a write index (the index that is being rolled over). This means that the restriction that aliases only point to one index is no longer necessary.
- Rollover explicitly (and atomically) swaps which index is the write-index by explicitly assigning the existing index to have `is_write_index: false` and have the newly created index have its rollover alias as `is_write_index: true`. This is only done when `is_write_index: true` on the write index. Default behavior of removing the alias from the rolled over index stays when `is_write_index` is not explicitly set

Relevant things that are staying the same:

- Rollover is rejected if there exist any templates that match the newly-created index and configure the rollover-alias
   - I think this existed to prevent the situation where an alias pointed to two indices for a short while. Although this can technically be relaxed, the specific cases that are safe are really particular and difficult to reason, so leaving the broad restriction sounds good
2018-07-30 14:32:55 -07:00
..
aliases.asciidoc update rollover to leverage write-alias semantics (#32216) 2018-07-30 14:32:55 -07:00
analyze.asciidoc Limit the number of tokens produced by _analyze (#27529) 2017-11-30 11:54:39 -05:00
clearcache.asciidoc Add support for field aliases. (#32172) 2018-07-18 09:33:09 -07:00
create-index.asciidoc [Docs] Fix a typo in Create Index naming limitation (#30891) 2018-06-01 18:15:24 +02:00
delete-index.asciidoc [DOCS] delete index no longer supports specifying aliases 2017-06-19 10:30:05 +02:00
flush.asciidoc Default to one shard (#30539) 2018-05-14 12:22:35 -04:00
forcemerge.asciidoc [docs] add warning for read-write indices in force merge documentation (#28869) 2018-05-09 18:53:55 +02:00
get-field-mapping.asciidoc Allow `_doc` as a type. (#27816) 2017-12-14 17:47:53 +01:00
get-index.asciidoc Remove comma-separated feature parsing for GetIndicesAction 2017-06-02 14:43:38 -06:00
get-mapping.asciidoc Add an `include_type_name` option. (#29453) 2018-04-11 15:54:16 +02:00
get-settings.asciidoc CONSOLEify some more Indices APIs (#24375) 2017-05-01 13:56:39 -04:00
indices-exists.asciidoc documentation fix: index exists is ambiguous (#28460) 2018-02-01 13:22:32 -08:00
open-close.asciidoc Add wait_for_active_shards parameter to index open command (#26682) 2017-09-22 11:15:03 +02:00
put-mapping.asciidoc Add an `include_type_name` option. (#29453) 2018-04-11 15:54:16 +02:00
recovery.asciidoc [Docs] Convert more doc snippets (#26359) 2017-08-28 11:23:09 +02:00
refresh.asciidoc Add CONSOLE to more docs 2016-09-01 17:08:18 -04:00
rollover-index.asciidoc update rollover to leverage write-alias semantics (#32216) 2018-07-30 14:32:55 -07:00
segments.asciidoc [Docs] Convert more doc snippets (#26359) 2017-08-28 11:23:09 +02:00
shard-stores.asciidoc [Docs] Convert more doc snippets (#26359) 2017-08-28 11:23:09 +02:00
shrink-index.asciidoc Default copy settings to true and deprecate on the REST layer (#30598) 2018-05-18 10:12:08 -04:00
split-index.asciidoc Default copy settings to true and deprecate on the REST layer (#30598) 2018-05-18 10:12:08 -04:00
stats.asciidoc Switch more docs to CONSOLE 2016-09-02 18:22:30 -04:00
templates.asciidoc Remove usage of explicit type in docs (#29667) 2018-06-04 09:42:29 -04:00
types-exists.asciidoc Switch indices.exists_type from `{index}/{type}` to `{index}/_mapping/{type}`. #20055 2016-08-19 09:18:24 +02:00
update-settings.asciidoc Docs: Add example of resetting index setting (#29048) 2018-03-19 20:04:58 -07:00