-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Migrate Index Management away from using the cat APIs #57286
Copy link
Copy link
Closed
Labels
Feature:Index ManagementIndex and index templates UIIndex and index templates UITeam:Kibana ManagementDev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//enhancementNew value added to drive a business resultNew value added to drive a business result
Metadata
Metadata
Assignees
Labels
Feature:Index ManagementIndex and index templates UIIndex and index templates UITeam:Kibana ManagementDev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//enhancementNew value added to drive a business resultNew value added to drive a business result
Type
Fields
Give feedbackNo fields configured for issues without a type.
Per elastic/elasticsearch#51772, cat APIs are not intended for consumption by applications. Index Management currently uses
_cat/aliasesand_cat/indicesto list index aliases and indices.As a side effect of using the cat APIs, Elasticsearch skips shard refreshes by default as of 7.0. This means that if you index a document and go to Index Management, the doc count for that index will be unchanged until that index is searched.
We can use the index stats API in lieu of cat indices:
However, these results are still affected by the skipped shard refreshes. Per discussion with Jason Tedor, we'd have to make an explicit refresh call to keep indices up-to-date, but refreshing every index can be very expensive and often unnecesssary:
Based on the above input, we should not bake a refresh into the request for fetching indices. If users need to see the most up-to-date doc count of an index, they should refresh it manually: