Skip to content

Conversation

houssain-barouni
Copy link
Collaborator

@houssain-barouni houssain-barouni commented Aug 7, 2025

This pull request refactors and simplifies the index settings management in Tasklist.
The main focus is was extracting the index settings update logic out of the createSchema that handles creating missing indices, templates and aliases
Now it is part of updateIndexSettings that makes sure that the number of replicas (for indices and component template) and shards (only in component template) are dynamically updated with the values from the configuration

If fixes 2 things:

  • update the number of replicas even for dated indices (using the alias)
  • update the number of shards in the component template, so that it is applied to the new indices created from the template

Description

Checklist

Related issues

closes #31238
relates to #32872

@github-actions github-actions bot added the component/tasklist Related to the Tasklist component/team label Aug 7, 2025
@houssain-barouni houssain-barouni changed the title fix: update task component template with configured number of shards … fix: update tasklist component template with configured number of shards and replicas Aug 7, 2025
@houssain-barouni houssain-barouni changed the title fix: update tasklist component template with configured number of shards and replicas update tasklist component template with configured number of shards and replicas Aug 7, 2025
@houssain-barouni houssain-barouni force-pushed the hb-fix-31238 branch 4 times, most recently from 898ad7b to 05f68b1 Compare August 7, 2025 19:09
@houssain-barouni houssain-barouni force-pushed the hb-fix-31238 branch 6 times, most recently from 985513c to 3a9acef Compare August 12, 2025 05:49
Copilot

This comment was marked as outdated.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates tasklist component template with configured number of shards and replicas, enabling better control over index configuration settings.

  • Updates schema management to use configurable shards and replicas per index
  • Adds index settings update functionality to both ElasticSearch and OpenSearch schema managers
  • Introduces comprehensive test coverage for component template settings updates

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ReindexOpenSearchIT.java Minor cleanup removing blank lines and updating method signatures
OpenSearchSchemaManagementIT.java Added comprehensive tests for component template settings updates
ElasticSearchSchemaManagementIT.java Added comprehensive tests for component template settings updates with ES-specific imports
OpenSearchSchemaManagerTest.java Updated test to use index-specific configuration methods
SchemaManager.java Added updateIndexSettings() method to interface
OpenSearchSchemaManager.java Implemented index settings update functionality and component template management
ElasticsearchSchemaManager.java Implemented index settings update functionality for ElasticSearch
SchemaStartup.java Added call to update index settings during schema initialization
IndexSchemaValidator.java Removed unused newerVersionsForIndex method
RetryOpenSearchClient.java Added methods for component template settings and alias management
IndexSchemaValidatorOpenSearch.java Simplified schema validation logic
RetryElasticsearchClient.java Added component template settings methods for ElasticSearch
IndexSchemaValidatorElasticSearch.java Simplified schema validation logic
TasklistOpenSearchProperties.java Added index-specific getter methods for shards and replicas
TasklistElasticsearchProperties.java Added index-specific getter methods for shards and replicas

@houssain-barouni houssain-barouni marked this pull request as ready for review August 12, 2025 06:15
@houssain-barouni houssain-barouni requested review from panagiotisgts and a team August 12, 2025 06:15
Copy link
Contributor

@panagiotisgts panagiotisgts left a comment

Choose a reason for hiding this comment

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

LGTM! Some minor suggestions

@houssain-barouni houssain-barouni added this pull request to the merge queue Aug 12, 2025
@houssain-barouni houssain-barouni added the backport stable/8.6 Backport a pull request to stable/8.6 label Aug 12, 2025
Merged via the queue into stable/8.7 with commit 6d2d6ba Aug 12, 2025
58 checks passed
@backport-action
Copy link
Collaborator

github-merge-queue bot pushed a commit that referenced this pull request Aug 12, 2025
…red number of shards and replicas (#36683)

# Description
Backport of #36569 to `stable/8.6`.

relates to #32872 #31238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable/8.6 Backport a pull request to stable/8.6 component/tasklist Related to the Tasklist component/team version:8.6.25
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants