Skip to content

Commit

Permalink
[Transform] add alias for backwards compatibility with 7.4 (#48049)
Browse files Browse the repository at this point in the history
add alias for backwards compatibility with 7.4

relates #47943
  • Loading branch information
Hendrik Muhs authored Oct 15, 2019
1 parent 620bd9d commit 4aa7c7b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import org.elasticsearch.Version;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.admin.indices.alias.Alias;
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequest;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.Client;
Expand Down Expand Up @@ -343,6 +344,8 @@ public static void installLatestVersionedIndexTemplateIfRequired(ClusterService
.patterns(indexTemplateMetaData.patterns())
.version(indexTemplateMetaData.version())
.settings(indexTemplateMetaData.settings())
// BWC: for mixed clusters with nodes < 7.5, we need the alias to make new docs visible for them
.alias(new Alias(".data-frame-internal-3"))
.mapping(SINGLE_MAPPING_NAME, XContentHelper.convertToMap(jsonMappings, true, XContentType.JSON).v2());
ActionListener<AcknowledgedResponse> innerListener = ActionListener.wrap(r -> listener.onResponse(null), listener::onFailure);
executeAsyncWithOrigin(client.threadPool().getThreadContext(), TRANSFORM_ORIGIN, request,
Expand Down

0 comments on commit 4aa7c7b

Please sign in to comment.