-
Notifications
You must be signed in to change notification settings - Fork 25k
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 the index type from internal watcher indexes #39761
Remove the index type from internal watcher indexes #39761
Conversation
This commit removes the "doc" type from watcher internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This impacts the .watches, .triggered-watches, and .watch-history indexes. External consumers do not need any changes since all external calls go through the _watcher API, and should not interact with the the .index directly. Relates elastic#38637
Pinging @elastic/es-core-features |
@@ -29,7 +29,7 @@ | |||
|
|||
public static final String TYPE = "index"; | |||
|
|||
@Nullable final String docType; |
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.
The changes to this file (IndexAction) were missed in #37594. I added it here to help us find what to remove when we completely get rid of types. Apologizes for conflating the two issues.
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.
LGTM
@@ -69,7 +69,7 @@ public void testWatchNotFound() { | |||
String watchId = "my_watch_id"; | |||
doAnswer(invocation -> { | |||
ActionListener<GetResponse> listener = (ActionListener<GetResponse>) invocation.getArguments()[1]; | |||
listener.onResponse(new GetResponse(new GetResult(Watch.INDEX, Watch.DOC_TYPE, watchId, UNASSIGNED_SEQ_NO, 0, -1, false, | |||
listener.onResponse(new GetResponse(new GetResult(Watch.INDEX, null, watchId, UNASSIGNED_SEQ_NO, 0, -1, false, |
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.
the response would have _doc
as a type in practice
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.
++ to changing that to use default mapping instead
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.
Pending just the one nit that @jpountz mentioned, im also approving this.
@@ -69,7 +69,7 @@ public void testWatchNotFound() { | |||
String watchId = "my_watch_id"; | |||
doAnswer(invocation -> { | |||
ActionListener<GetResponse> listener = (ActionListener<GetResponse>) invocation.getArguments()[1]; | |||
listener.onResponse(new GetResponse(new GetResult(Watch.INDEX, Watch.DOC_TYPE, watchId, UNASSIGNED_SEQ_NO, 0, -1, false, | |||
listener.onResponse(new GetResponse(new GetResult(Watch.INDEX, null, watchId, UNASSIGNED_SEQ_NO, 0, -1, false, |
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.
++ to changing that to use default mapping instead
@elasticmachine run elasticsearch-ci/1 |
1 similar comment
@elasticmachine run elasticsearch-ci/1 |
This commit removes the "doc" type from watcher internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This impacts the .watches, .triggered-watches, and .watch-history indexes. External consumers do not need any changes since all external calls go through the _watcher API, and should not interact with the the .index directly. Relates elastic#38637
This commit removes the "doc" type from watcher internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This impacts the .watches, .triggered-watches, and .watch-history indexes. External consumers do not need any changes since all external calls go through the _watcher API, and should not interact with the the .index directly. Relates elastic#38637
This commit removes the "doc" type from watcher internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This impacts the .watches, .triggered-watches, and .watch-history indexes. External consumers do not need any changes since all external calls go through the _watcher API, and should not interact with the the .index directly. Relates #38637
This commit removes the "doc" type from watcher internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This impacts the .watches, .triggered-watches, and .watch-history indexes. External consumers do not need any changes since all external calls go through the _watcher API, and should not interact with the the .index directly. Relates #38637
This commit removes the "doc" type from watcher internal indexes.
The template still carries the "_doc" type since that is needed for
the internal representation.
This impacts the .watches, .triggered-watches, and .watch-history indexes.
External consumers do not need any changes since all external calls
go through the _watcher API, and should not interact with the the .index directly.
Relates #38637