Skip to content

Commit

Permalink
Fix indices shown in _cat/indices (elastic#43286)
Browse files Browse the repository at this point in the history
After two recent changes (elastic#38824 and elastic#33888), the _cat/indices API
no longer report information for active recovering indices and
non-replicated closed indices. It also misreport replicated closed
indices that are potentially not authorized for the user.

This commit changes how the cat action works by first using the
Get Settings API in order to resolve authorized indices. It then uses
the Cluster State, Cluster Health and Indices Stats APIs to retrieve
 information about the indices.

Closes elastic#39933
  • Loading branch information
tlrx committed Jun 25, 2019
1 parent 66693c2 commit 21e377d
Show file tree
Hide file tree
Showing 5 changed files with 494 additions and 249 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
registerHandler.accept(new RestMasterAction(settings, restController));
registerHandler.accept(new RestNodesAction(settings, restController));
registerHandler.accept(new RestTasksAction(settings, restController, nodesInCluster));
registerHandler.accept(new RestIndicesAction(settings, restController, indexNameExpressionResolver));
registerHandler.accept(new RestIndicesAction(settings, restController));
registerHandler.accept(new RestSegmentsAction(settings, restController));
// Fully qualified to prevent interference with rest.action.count.RestCountAction
registerHandler.accept(new org.elasticsearch.rest.action.cat.RestCountAction(settings, restController));
Expand Down
Loading

0 comments on commit 21e377d

Please sign in to comment.