Skip to content

Conversation

@alexey-ivanov-es
Copy link
Contributor

This commit adds support for system data streams reindexing. The system data stream migration extends the existing system indices migration task and uses the data stream reindex API.
The system index migration task starts a reindex data stream task and tracks its status every second. Only one system index or system data stream is migrated at a time. If a data stream migration fails, the entire system index migration task will also fail.

Port of #123926

It seems the best way to fix elastic#122949 is to use existing data stream reindex API. However, this API is located in the migrate x-pack plugin. This commit moves the system indices migration logic (REST handlers, transport actions, and task) to the migrate plugin.

Port of elastic#123551
This commit adds support for system data streams reindexing. The system data stream migration extends the existing system indices migration task and uses the data stream reindex API.
The system index migration task starts a reindex data stream task and tracks its status every second. Only one system index or system data stream is migrated at a time. If a data stream migration fails, the entire system index migration task will also fail.

Port of elastic#123926
@alexey-ivanov-es alexey-ivanov-es added >bug :Core/Infra/Core Core issues without another label v9.0.0 labels Mar 14, 2025
@alexey-ivanov-es alexey-ivanov-es changed the title System data stream migration 9.0 [9.0] System data streams are not being upgraded in the feature migration API Mar 14, 2025
elasticsearchmachine and others added 3 commits March 14, 2025 13:41
…igration_9.0

# Conflicts:
#	server/src/main/java/org/elasticsearch/indices/SystemIndices.java
#	x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/system_indices/action/AbstractFeatureMigrationIntegTest.java
#	x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/system_indices/action/FeatureMigrationIT.java
#	x-pack/plugin/migrate/src/main/java/org/elasticsearch/system_indices/task/SystemIndexMigrationExecutor.java
#	x-pack/plugin/migrate/src/main/java/org/elasticsearch/system_indices/task/SystemIndexMigrationInfo.java
#	x-pack/plugin/migrate/src/main/java/org/elasticsearch/system_indices/task/SystemIndexMigrator.java
#	x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/MigratePlugin.java
#	x-pack/plugin/migrate/src/test/java/org/elasticsearch/system_indices/action/TransportGetFeatureUpgradeStatusActionTests.java
@alexey-ivanov-es alexey-ivanov-es marked this pull request as ready for review March 14, 2025 16:50
@alexey-ivanov-es alexey-ivanov-es requested a review from a team as a code owner March 14, 2025 16:50
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Mar 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Contributor

@JVerwolf JVerwolf left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@alexey-ivanov-es alexey-ivanov-es enabled auto-merge (squash) March 14, 2025 17:21
@alexey-ivanov-es alexey-ivanov-es enabled auto-merge (squash) March 14, 2025 19:46
Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

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

Fleet file LGTM

@alexey-ivanov-es alexey-ivanov-es merged commit 3e51ea6 into elastic:9.0 Mar 14, 2025
15 of 16 checks passed
@alexey-ivanov-es alexey-ivanov-es deleted the system_data_stream_migration_9.0 branch March 17, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v9.0.0 v9.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants