[Transform] add alias for backwards compatibility with 7.4 (#48049)
add alias for backwards compatibility with 7.4 relates #47943
This commit is contained in:
parent
620bd9d224
commit
4aa7c7bad6
|
@ -8,6 +8,7 @@ package org.elasticsearch.xpack.transform.persistence;
|
|||
|
||||
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;
|
||||
|
@ -343,6 +344,8 @@ public final class TransformInternalIndex {
|
|||
.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,
|
||||
|
|
Loading…
Reference in New Issue