Allow deleting a backing index via modify data streams API#151137
Allow deleting a backing index via modify data streams API#151137jbaiera wants to merge 11 commits into
Conversation
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
|
Hi @jbaiera, I've created a changelog YAML for you. |
🔍 Preview links for changed docs⏳ Building and deploying preview... View progress This comment will be updated with preview links when the build is complete. |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
Adds a new operation type to the modify data stream API that deletes a backing index from a data stream. PR includes a new node feature to ensure master node supports the operation before accepting it, as well as the requisite wire changes. Added new unit tests and a new rest test case. Deleting an index requires a ProjectState instance instead of a ProjectMetadata instance, so there's some light cluster state juggling in here to make that work too.
A quick thought: Instead of calling to MetadataIndexDeleteService directly for deleting the backing index (which would remove it from the data stream if safe to do so as well) this PR ensures that the index being deleted does actually belong to the data stream before deleting it. Not sure how helpful this invariant actually is, especially since in most cases that this feature would be useful, we may have more than one index to delete along with the backing index as part of a cleanup process. Indices not actively part of the data stream would still need to be deleted separately (see the DLM frozen transition
maybeCleanupmethod which potentially deletes the force merge index if it is different from the original index).Remains to do: Updating the rest spec with the new operation type
robots.txt
I asked claude to do the unit test callsite refactorings in 271a528