Skip to content

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented Nov 7, 2025

Description

This PR contains an optimization for the cluster state that would particularly be beneficial in cases of index rollover where many indices in the cluster share the same mappings.

This is another (and probably the largest) optimization along with 2 other related PRs:

For this optimization, it works at the time that the new Metadata instance is built to try de-duplicating the mappings if multiple indices share the same mappings.

Related Issues

Related to:

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…e mappings in the cluster state

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks
Copy link
Member Author

cwperks commented Nov 7, 2025

This seems like low hanging fruit to optimize cluster state heap utilization esp in clusters with many rolled over indices. Is there anything I'm missing with this?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

❌ Gradle check result for 66fe01d: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks
Copy link
Member Author

cwperks commented Nov 7, 2025

MappingMetadata can only have a single type which is _doc. See https://stackoverflow.com/a/53688626 for more details.

Single mapping type is declared here: https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/mapper/MapperService.java#L126

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

❌ Gradle check result for 4937d4a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

❌ Gradle check result for 4937d4a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant