-
Notifications
You must be signed in to change notification settings - Fork 36
Upgrade mapping #278
Upgrade mapping #278
Conversation
Codecov Report
@@ Coverage Diff @@
## master #278 +/- ##
============================================
- Coverage 70.72% 70.08% -0.65%
- Complexity 1797 1815 +18
============================================
Files 187 190 +3
Lines 8687 8867 +180
Branches 735 756 +21
============================================
+ Hits 6144 6214 +70
- Misses 2194 2298 +104
- Partials 349 355 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -124,6 +126,7 @@ protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient cli | |||
? WriteRequest.RefreshPolicy.parse(request.param(REFRESH)) | |||
: WriteRequest.RefreshPolicy.IMMEDIATE; | |||
RestRequest.Method method = request.getHttpRequest().method(); | |||
anomalyDetectionIndices.updateMappingIfNecessary(); |
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.
Will this fail with FGAC ?
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.
Yeah..lets move this to transport layer. Since Anomaly Detection indices will be part of system index, we cannot update them.
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.
yeah, moved to transport layer. After moving, tested working with fgac.
This PR updates the current AD index mapping if a new version is detected. Previously, we didn't do so. This will cause issues when upgrading AD binary version: newly added fields will not be searchable, though we can still send get requests to fetch them. Testing done: 1. manual upgrade testing passes. 2. will add unit tests later.
c501a64
to
c599d37
Compare
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. Thanks for the change
Issue #, if available:
Description of changes:
This PR updates the current AD index mapping if a new version is detected. Previously, we didn't do so. This will cause issues when upgrading AD binary version: newly added fields will not be searchable, though we can still send get requests to fetch them.
This PR also makes the cache miss handling setting a dynamic setting.
Testing done:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.