Skip to content

Commit 101a5fc

Browse files
Set cause on create index request in create from action (#124363) (#124373)
In the create-index-from-source action, we should set the cause of the create index request so that it is clear in the logs. Without setting the cause on the request, the default value of api is used.
1 parent b7c9af1 commit 101a5fc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/changelog/124363.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124363
2+
summary: Set cause on create index request in create from action
3+
area: Data streams
4+
type: enhancement
5+
issues: []

x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/action/CreateIndexFromSourceTransportAction.java

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ protected void doExecute(Task task, CreateIndexFromSourceAction.Request request,
109109
}
110110

111111
var createIndexRequest = new CreateIndexRequest(request.destIndex()).settings(settings);
112+
createIndexRequest.cause("create-index-from-source");
112113
if (mergeMappings.isEmpty() == false) {
113114
createIndexRequest.mapping(mergeMappings);
114115
}

0 commit comments

Comments
 (0)