OpenSearch/docs/reference/indices
Lee Hinman c3c9ccf61f
[7.x] Add ILM histore store index (#50287) (#50345)
* Add ILM histore store index (#50287)

* Add ILM histore store index

This commit adds an ILM history store that tracks the lifecycle
execution state as an index progresses through its ILM policy. ILM
history documents store output similar to what the ILM explain API
returns.

An example document with ALL fields (not all documents will have all
fields) would look like:

```json
{
  "@timestamp": 1203012389,
  "policy": "my-ilm-policy",
  "index": "index-2019.1.1-000023",
  "index_age":123120,
  "success": true,
  "state": {
    "phase": "warm",
    "action": "allocate",
    "step": "ERROR",
    "failed_step": "update-settings",
    "is_auto-retryable_error": true,
    "creation_date": 12389012039,
    "phase_time": 12908389120,
    "action_time": 1283901209,
    "step_time": 123904107140,
    "phase_definition": "{\"policy\":\"ilm-history-ilm-policy\",\"phase_definition\":{\"min_age\":\"0ms\",\"actions\":{\"rollover\":{\"max_size\":\"50gb\",\"max_age\":\"30d\"}}},\"version\":1,\"modified_date_in_millis\":1576517253463}",
    "step_info": "{... etc step info here as json ...}"
  },
  "error_details": "java.lang.RuntimeException: etc\n\tcaused by:etc etc etc full stacktrace"
}
```

These documents go into the `ilm-history-1-00000N` index to provide an
audit trail of the operations ILM has performed.

This history storage is enabled by default but can be disabled by setting
`index.lifecycle.history_index_enabled` to `false.`

Resolves #49180

* Make ILMHistoryStore.putAsync truly async (#50403)

This moves the `putAsync` method in `ILMHistoryStore` never to block.
Previously due to the way that the `BulkProcessor` works, it was possible
for `BulkProcessor#add` to block executing a bulk request. This was bad
as we may be adding things to the history store in cluster state update
threads.

This also moves the index creation to be done prior to the bulk request
execution, rather than being checked every time an operation was added
to the queue. This lessens the chance of the index being created, then
deleted (by some external force), and then recreated via a bulk indexing
request.

Resolves #50353
2019-12-20 12:33:36 -07:00
..
apis [DOCS] Clarify frozen indices are read-only (#50318) 2019-12-18 12:18:38 -05:00
add-alias.asciidoc [DOCS] Update tagged region for index alias desc (#46886) 2019-09-19 15:30:33 -04:00
alias-exists.asciidoc [DOCS] Update tagged region for index alias desc (#46886) 2019-09-19 15:30:33 -04:00
aliases.asciidoc [DOCS] Update tagged region for index alias desc (#46886) 2019-09-19 15:30:33 -04:00
analyze.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
clearcache.asciidoc [DOCS] Reformat clear cache API docs (#46512) (#47662) 2019-10-07 09:36:30 -04:00
clone-index.asciidoc [DOCS] Reformat clone index API docs (#46762) 2019-09-25 12:37:53 -04:00
close.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
create-index.asciidoc [DOCS] Reformat rollover index API docs (#46778) 2019-09-23 09:18:33 -04:00
delete-alias.asciidoc [DOCS] Update tagged region for index alias desc (#46886) 2019-09-19 15:30:33 -04:00
delete-index-template.asciidoc [DOCS] Reorder index APIs alphabetically (#46981) (#47402) 2019-10-01 17:07:28 -04:00
delete-index.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
flush.asciidoc [DOCS] Correct the request path for flush API docs (#49615) 2019-11-27 09:27:28 -05:00
forcemerge.asciidoc [DOCS] Reformat force merge API docs (#46685) 2019-09-18 10:10:51 -04:00
get-alias.asciidoc [DOCS] Update tagged region for index alias desc (#46886) 2019-09-19 15:30:33 -04:00
get-field-mapping.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
get-index-template.asciidoc [DOCS] Reorder index APIs alphabetically (#46981) (#47402) 2019-10-01 17:07:28 -04:00
get-index.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
get-mapping.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
get-settings.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
indices-exists.asciidoc [DOCS] Reformat type exists API docs (#47601) 2019-10-07 08:49:42 -04:00
open-close.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
put-mapping.asciidoc [DOCS] Expand put mapping API docs examples (#47462) 2019-10-17 09:31:52 -04:00
recovery.asciidoc [DOCS] Reformat index recovery API docs (#46493) (#47527) 2019-10-03 16:43:26 -04:00
refresh.asciidoc [DOCS] Reformat refresh API docs (#46667) (#47589) 2019-10-04 13:50:09 -04:00
rollover-index.asciidoc [7.x] Add ILM histore store index (#50287) (#50345) 2019-12-20 12:33:36 -07:00
segments.asciidoc [DOCS] Remove cat request from Index Segments API requests (#46463) 2019-09-06 16:47:00 -04:00
shard-stores.asciidoc [DOCS] Reformat index shard stores API docs (#46504) 2019-10-03 15:57:35 -04:00
shrink-index.asciidoc [DOCS] Reformat shrink index API docs (#46711) (#47586) 2019-10-04 14:00:18 -04:00
split-index.asciidoc [DOCS] Correct typo in split index API docs (#48894) 2019-11-07 15:27:27 -05:00
stats.asciidoc [DOCS] Reformat index stats API docs (#46322) 2019-09-05 15:45:02 -04:00
synced-flush.asciidoc [DOCS] Skip synced flush docs tests (#49986) 2019-12-09 13:17:38 -05:00
template-exists.asciidoc [DOCS] Change // CONSOLE comments to [source,console] (#46441) (#46451) 2019-09-06 11:31:13 -04:00
templates.asciidoc [Docs] Fix typo in templates.asciidoc (#49726) 2019-11-29 18:43:13 +01:00
types-exists.asciidoc [DOCS] Reformat type exists API docs (#47601) 2019-10-07 08:49:42 -04:00
update-settings.asciidoc [DOCS] Correct anchors and title for Update index settings API docs (#46707) 2019-09-13 09:45:52 -04:00