Skip to content

Commit

Permalink
Fix indices shown in _cat/indices (#43286)
Browse files Browse the repository at this point in the history
After two recent changes (#38824 and #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 #39933
  • Loading branch information
tlrx committed Jun 25, 2019
1 parent 05689de commit ba07eb4
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 @@ -651,7 +651,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 ba07eb4

Please sign in to comment.