Make index.lifecycle.name setting internal#32518
Make index.lifecycle.name setting internal#32518dakrone merged 2 commits intoelastic:index-lifecyclefrom
Conversation
This commit makes the `index.lifecycle.name` setting internal an index, this means that the policy can only be set on the index creation, or with the specialized `RestSetIndexLifecyclePolicy` action. Relates to elastic#29823
|
Pinging @elastic/es-core-infra |
We did not preserve the current version of the policy that was mid-execution, so it was not always safe (see Shrink) to switch policies without extra validation and guards against potential issues. That being said, latest meetings around this led to the new design goal laid out in the meta issue:
The above state preservation would void any validation and guards since each index would remember what it is currently executing, so switching the policy underneath would not be a problem. Let me know if that made sense @dakrone. We may not need this API at all anymore |
|
I think that does make sense, in that case I'm extra-+1 on the solution where we preserved the state in the metadata so that we can completely remove this API. @colings86 does that sound good? If so, I will work on removing the |
I'm not sure I follow here because we have
I think we should wait until we have done the work to store the current phase in the index metadata before we remove this API so we can make sure its definitely not needed anymore, from both a technical and non-technical standpoint |
Gah, I (erroneously) assumed that because all the tests were using the settings version that we didn't have an API for it.
Okay, I've changed the test to use the remove policy action, do we want to merge this for now and discuss removing it at a later time? |
…ecycle-underscore-x-pack * elastic/index-lifecycle: Make index.lifecycle.name setting internal (elastic#32518)
This commit makes the `index.lifecycle.name` setting internal an index, this means that the policy can only be set on the index creation, or with the specialized `RestSetIndexLifecyclePolicy` action. Relates to #29823
This commit makes the
index.lifecycle.namesetting internal an index, thismeans that the policy can only be set on the index creation, or with the
specialized
RestSetIndexLifecyclePolicyaction.Relates to #29823
@colings86 I'm not 100% sure we should do as-is. You currently can't remove a policy from the index, unlike a setting (which you could set to
nullto remove it) we don't currently have a way to do that, in order to delete a policy then you have to create a dummy policy and update the index to use it. Maybe someone can explain more of the background for why we originally wanted this to be an internal setting?I think we should either add an API to remove the lifecycle policy from an index, or keep this as a dynamic setting, what do you think?