Skip to content
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

Add prefer_v2_templates parameter to Reindex #56253

Merged
merged 6 commits into from
May 6, 2020

Conversation

probakowski
Copy link
Contributor

Relates to #53101

@probakowski probakowski added >enhancement :Data Management/Indices APIs APIs to create and manage indices and templates v8.0.0 v7.8.0 labels May 5, 2020
@probakowski probakowski requested review from dakrone and andreidan May 5, 2020 22:12
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label May 5, 2020
@probakowski
Copy link
Contributor Author

@elasticmachine update branch

@elasticmachine
Copy link
Collaborator

user doesn't have permission to update head repository

@probakowski
Copy link
Contributor Author

@elasticmachine update branch

@elasticmachine
Copy link
Collaborator

user doesn't have permission to update head repository

@dakrone dakrone changed the title Add prefere_v2_templates parameter to Reindex Add prefer_v2_templates parameter to Reindex May 5, 2020
Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

Thanks for doing this @probakowski! I left two really minor comments that are just related to BWC for the request, otherwise this looks good to me!

@pugnascotia pugnascotia added v7.8.1 and removed v7.8.0 labels May 6, 2020
Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Przemko

@@ -68,6 +68,11 @@ protected ReindexRequest buildRequest(RestRequest request) throws IOException {
if (request.hasParam("scroll")) {
internal.setScroll(parseTimeValue(request.param("scroll"), "scroll"));
}

if (request.hasParam("prefer_v2_templates")) {
internal.preferV2Templates(Boolean.parseBoolean(request.param("prefer_v2_templates")));
Copy link
Contributor

Choose a reason for hiding this comment

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

for 8.0 we want this to default to true if it's not specified by the user (this is just a reminder to change this after backport)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder if we should change it here or simply pass null down the road and let create index request pick up correct default (for making it DRY and using only single place to set defaults)

@pugnascotia pugnascotia added v7.9.0 and removed v7.8.1 labels May 6, 2020
@martijnvg martijnvg mentioned this pull request May 6, 2020
39 tasks
@probakowski
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@probakowski probakowski merged commit 7ca47f5 into elastic:master May 6, 2020
@probakowski probakowski deleted the reindex-prefer-v2-templates branch May 6, 2020 20:01
probakowski added a commit to probakowski/elasticsearch that referenced this pull request May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement Team:Data Management Meta label for data/management team v7.9.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants