-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[index management] Faster index list loading #246276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 54 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
24ceaa6
partial progress
mattkime 9d73092
ccr progress
mattkime e23108b
ccr progress
mattkime 0afaa99
Merge branch 'main' into index_mgmt_faster_list_loading
mattkime 8f3bcc2
partial progress
mattkime d2edb8c
partial progress
mattkime c8fe180
Merge branch 'main' into index_mgmt_faster_list_loading
mattkime b17a31a
revert unneeded changes
mattkime 151949f
simplify browser side index data enhancement api
mattkime b1b8151
loading data via multiple requests and merging
mattkime 728bc2c
comment cleanup
mattkime e21c1a8
largely working
mattkime 8015500
remove console.log
mattkime 8699d81
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine f0793a4
cleanup
mattkime 341e80d
localize errors
mattkime 7dbbc4f
comment cleanup
mattkime 9728011
Changes from node scripts/lint_ts_projects --fix
kibanamachine 91e3bd5
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine becc695
type fixes
mattkime 52887c7
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime fbebc86
type fix and remove console.log statements
mattkime 3d34bd8
swap formatter as to address bundle size problem
mattkime c163174
swap formatter as to address bundle size problem
mattkime a46c7e6
cleanup
mattkime 11f1fab
i18n fixes
mattkime ace72c4
test fixes
mattkime ee9a91b
show loading errors
mattkime 029b1d8
add tests for displaying errors
mattkime f269013
remove unused var
mattkime 875417e
cleanup
mattkime 4acd459
address alias use case for rollups
mattkime fdb6282
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine b7600ef
remove comment
mattkime a0bc8ad
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime 8a7cf51
fix rollup enricher
mattkime 2fae497
Merge branch 'main' into index_mgmt_faster_list_loading
mattkime 7afdddd
start get indices request before enricher requests
mattkime 688e1e0
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime 8fca925
cancel requests on reload, centalized catching of errors
mattkime 5e1bebe
update indices tab test
mattkime 9c75013
redue index stats response
mattkime 631d247
address abortError for main index fetch
mattkime 1773baf
move abort signal up one level
mattkime 815dd60
move abort signal up one level
mattkime 3f6400c
switch back to js
mattkime d57acc7
fix sorting on size
mattkime 471dc0d
type fix
mattkime fdb5b7e
Merge branch 'main' into index_mgmt_faster_list_loading
mattkime 4c1b97c
type fixes
mattkime cdc5cff
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime 37b8d1c
test fix?
mattkime f743327
fix formatting
mattkime d71c71d
functional test fixes
mattkime fb195a4
centralize formatter
mattkime 4dc24cb
Changes from node scripts/lint_ts_projects --fix
kibanamachine 939b61b
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine dec6095
centralize formatter
mattkime 8d04a1c
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime 6e8b099
import fix
mattkime db62978
import fix
mattkime 14300c8
type changes
mattkime a4752e7
minor cleanup
mattkime 0327c36
format document count
mattkime File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
x-pack/platform/plugins/private/cross_cluster_replication/public/ccr_data_enricher.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import type { HttpSetup } from '@kbn/core/public'; | ||
| import type { CcrFollowInfoResponse } from '@elastic/elasticsearch/lib/api/types'; | ||
| import type { EnricherResponse } from '@kbn/index-management-shared-types'; | ||
| import { i18n } from '@kbn/i18n'; | ||
| const SOURCE = i18n.translate('xpack.crossClusterReplication.ccrDataEnricher.source', { | ||
| defaultMessage: 'cross cluster replication', | ||
| }); | ||
|
|
||
| export const ccrDataEnricher = { | ||
| name: SOURCE, | ||
| fn: async (client: HttpSetup, signal: AbortSignal): Promise<EnricherResponse> => | ||
| client | ||
| .get<CcrFollowInfoResponse>('/api/cross_cluster_replication/follower_info', { signal }) | ||
| .then((response) => { | ||
| return { | ||
| indices: response.follower_indices.map((followerIndex) => ({ | ||
| name: followerIndex.follower_index, | ||
| isFollowerIndex: true, | ||
| })), | ||
| source: SOURCE, | ||
| }; | ||
| }), | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
.../cross_cluster_replication/server/routes/api/follower_index/register_get_follower_info.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import { addBasePath } from '../../../services'; | ||
| import type { RouteDependencies } from '../../../types'; | ||
|
|
||
| export const registerGetFollowerInfoRoute = ({ | ||
| router, | ||
| license, | ||
| lib: { handleEsError }, | ||
| }: RouteDependencies) => { | ||
| router.get( | ||
| { | ||
| path: addBasePath('/follower_info'), | ||
| security: { | ||
| authz: { | ||
| enabled: false, | ||
| reason: 'Relies on es client for authorization', | ||
| }, | ||
| }, | ||
| validate: {}, | ||
| }, | ||
| license.guardApiRoute(async (context, request, response) => { | ||
| const { client } = (await context.core).elasticsearch; | ||
|
|
||
| try { | ||
| const body = await client.asCurrentUser.ccr.followInfo({ | ||
| index: '_all', | ||
| }); | ||
|
|
||
| return response.ok({ | ||
| body, | ||
| }); | ||
| } catch (error) { | ||
| return handleEsError({ error, response }); | ||
| } | ||
| }) | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...atform/plugins/private/index_lifecycle_management/public/index_lifecycle_data_enricher.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import type { IlmExplainLifecycleResponse } from '@elastic/elasticsearch/lib/api/types'; | ||
| import type { HttpSetup } from '@kbn/core/public'; | ||
| import type { EnricherResponse } from '@kbn/index-management-shared-types'; | ||
| import { i18n } from '@kbn/i18n'; | ||
| const SOURCE = i18n.translate('xpack.indexLifecycleMgmt.indexLifecycleDataEnricher.source', { | ||
| defaultMessage: 'index lifecycle', | ||
| }); | ||
|
|
||
| export const indexLifecycleDataEnricher = { | ||
| name: SOURCE, | ||
| fn: async (client: HttpSetup, signal: AbortSignal): Promise<EnricherResponse> => | ||
| client | ||
| .get<IlmExplainLifecycleResponse>('/api/index_lifecycle_management/explain', { signal }) | ||
| .then((response) => { | ||
| return { | ||
| indices: Object.keys(response.indices).map((index) => ({ | ||
| name: index, | ||
| ilm: response.indices[index], | ||
| })), | ||
| source: SOURCE, | ||
| }; | ||
| }), | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.