Skip to content
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

Split .kibana system index into multiple indices #154444

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Apr 5, 2023

Part of #104081
Depends on #154151

First attempt is to move all 'cases*' saved objects into a separate .kibana_cases index.
esArchiver (along with all FTR that use it) has proven a worthy enemy of this initiative, as it relies on the fact that there are only two system indices: .kibana and .kibana_task_manager.

@gsoldevila gsoldevila added release_note:enhancement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc enhancement New value added to drive a business result backport:skip This commit does not require backporting Feature:Migrations v8.8.0 labels Apr 5, 2023
@@ -65,6 +65,7 @@ export function mergeMigrationMappingPropertyHashes(
return {
...targetMappings,
_meta: {
...targetMappings._meta,
Copy link
Contributor

@pgayvallet pgayvallet Apr 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no unit tests for this mergeMigrationMappingPropertyHashes helper. We should add some (and assert the behavior of this change/fix)

Should this be done in the current PR or on the 'upstream' one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do it on the upstream PR.

But first I wanted to check whether this mergeMigrationMappingPropertyHashes operation is still necessary.
If we want to use these hashes as a basis to construct the indexTypesMap, I'm afraid the merge can be problematic. @rudolf WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use these in checkTargetMappings as a way to determine if mappings are up to date. If we don't merge the _meta it means there could be plugins which have applied some mappings that we don't know about. This would cause us to go to UPDATE_TARGET_MAPPINGS_PROPERTIES which would be unecessary but not a problem. So I don't see an obvious problem right now.

@kibana-ci
Copy link
Collaborator

kibana-ci commented Apr 12, 2023

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #41 / machine learning - short tests Notifcations Notifications list supports custom sorting for notifications level

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/core-saved-objects-migration-server-internal 85 87 +2
@kbn/core-saved-objects-server 99 101 +2
total +4

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/core-saved-objects-base-server-internal 8 9 +1

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
cases 50 - -50
cases-comments 14 - -14
cases-configure 4 - -4
cases-connector-mappings 2 - -2
cases-user-actions 16 - -16
total -86
Unknown metric groups

API count

id before after diff
@kbn/core-saved-objects-migration-server-internal 120 122 +2
@kbn/core-saved-objects-server 493 496 +3
total +5

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 512 515 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@gsoldevila
Copy link
Contributor Author

Replaced by #154888

@gsoldevila gsoldevila closed this Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting enhancement New value added to drive a business result Feature:Migrations release_note:enhancement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants