-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove _timestamp
and _ttl
on 5.x indices.
#18980
Conversation
@@ -100,6 +101,9 @@ public TTLFieldMapper build(BuilderContext context) { | |||
public static class TypeParser implements MetadataFieldMapper.TypeParser { | |||
@Override | |||
public MetadataFieldMapper.Builder parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException { | |||
if (parserContext.indexVersionCreated().onOrAfter(Version.V_5_0_0_alpha4)) { | |||
throw new IllegalArgumentException("[_ttl] is removed in 5.0. As a replacement, you can delete by range query on a timestamp field."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "you should use time based indexes or cron a delete-by-query with a range query on a timestamp field"? Or something that mentions time based indexes....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
I wonder if we should still keep some of those REST tests? I thought we could set the created version. While we still support the behavior we should try. Should we yank the reindex module's support for timestamp and ttl? There is some basic scripting support in there. We could do it as another PR. All of the test looks good to me though. |
Apparently we cannot set the version in the REST tests. I am not sure what exactly to do for reindex, would it be easy today already to move the value of the _timestamp to a regular field? It looks so using a script given that we put the _timestamp into the context of the script? |
Yeah, I think it'd be easy to do. Maybe we don't do anything to reindex now and wait for 6.0 or something. That way reindex can still deal with timestamp, including moving it to a field. |
This plan sounds good to me. |
LGTM. I can add a use case example to the docs for reindex that shows moving _timestamp to a field. |
I think it would be great to have it in the migration notes! |
This removes the ability to use `_timestamp` and `_ttl` on indices created on or after 5.0. Closes elastic#18280
a3fa093
to
969e953
Compare
This reverts commit 969e953. Docs are failing because of the removed functionality. I will fix the docs before pushing it again.
This removes the ability to use `_timestamp` and `_ttl` on indices created on or after 5.0. Closes #18280
We aren't able to actually create an index with _timestamp enabled to test the migration, or, at least, we won't be able to after elastic#18980 is re-merged. But the docs are still ok. Closes elastic#19007
…ic/elasticsearch#18980 so that migrated 2.x indices do not have their code altered (just yet)
deprecate _ttl/_timestamp and remove them from our tests as per elastic/elasticsearch#18980 so that migrated 2.x indices do not have their code altered (just yet) explicit 5.x spec generation fix failing nodes test because is removed as per elastic/elasticsearch#19218 fixed failing integration tests due to lang no longer defaulting to groovy elastic/elasticsearch#19960 fields => stored fields, updated failing cathelp tests due to endpoint changing suggest response is now generic and gets _source returned in accordance with elastic/elasticsearch#19536 histogram key double not long source filtering include and exclude are now plural script fields tests did not explicitly specify groovy search's StoredFields still sent get task api tests wreaked havoc on the readonly tests scripted metric did not specify lang set script.max_compilations_per_minute on node fix top hits not setting groovy explicitly multi search now response 404 properly multitermvector tests making sure it took more then 0 is no longer reliable beta1 is too fast :) foreach put pipeline processors is no longer an array as per elastic/elasticsearch#19402 revert field=>stored_fields rename on update request remove propery name with dot failure assertion integration test, no longer valid since elastic/elasticsearch#19899 use existing elasticsearch node in test framework could still spawn a new java process revert field=>stored_fields rename on update request get pipeline api is now dictionary based as per elastic/elasticsearch#19685 xpack beta1 related fixes reindex tests not setting all waithandles and taking 3 minutes for no good reason missing fieldsecurity class fix post integration test failures unit test failures add back run as tests now that we send the right header in the beta1 world
* removed deleted file from csproj deprecate _ttl/_timestamp and remove them from our tests as per elastic/elasticsearch#18980 so that migrated 2.x indices do not have their code altered (just yet) explicit 5.x spec generation fix failing nodes test because is removed as per elastic/elasticsearch#19218 fixed failing integration tests due to lang no longer defaulting to groovy elastic/elasticsearch#19960 fields => stored fields, updated failing cathelp tests due to endpoint changing suggest response is now generic and gets _source returned in accordance with elastic/elasticsearch#19536 histogram key double not long source filtering include and exclude are now plural script fields tests did not explicitly specify groovy search's StoredFields still sent get task api tests wreaked havoc on the readonly tests scripted metric did not specify lang set script.max_compilations_per_minute on node fix top hits not setting groovy explicitly multi search now response 404 properly multitermvector tests making sure it took more then 0 is no longer reliable beta1 is too fast :) foreach put pipeline processors is no longer an array as per elastic/elasticsearch#19402 revert field=>stored_fields rename on update request remove propery name with dot failure assertion integration test, no longer valid since elastic/elasticsearch#19899 use existing elasticsearch node in test framework could still spawn a new java process revert field=>stored_fields rename on update request get pipeline api is now dictionary based as per elastic/elasticsearch#19685 xpack beta1 related fixes reindex tests not setting all waithandles and taking 3 minutes for no good reason missing fieldsecurity class fix post integration test failures unit test failures add back run as tests now that we send the right header in the beta1 world * make sure code is generated of master after mass picking commits of 5.x branch
This removes the ability to use
_timestamp
and_ttl
on indices created onor after 5.0.
Closes #18280