Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Field cap fix #422

Merged
merged 7 commits into from
Mar 30, 2021
Merged

Conversation

thalurur
Copy link
Contributor

@thalurur thalurur commented Mar 26, 2021

Issue #, if available:
#418

#424

Description of changes:
Update FieldCaps interception to support remote cluster indices, and also supporting both merged and unmerged response rewriting of FieldCapsResponse.

  • FieldCapsResponse hold unmerged data if its a cross cluster request and merged otherwise. Earlier we were only rewriting merged data.
  • Introducing a setting to stop interception in case user isn't using rollup - this acts like a kill switch if there are any unexpected behavior from the interception.

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Merging #422 (66e91b0) into main (f1e59ad) will decrease coverage by 0.30%.
The diff coverage is 79.72%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #422      +/-   ##
============================================
- Coverage     77.12%   76.81%   -0.31%     
+ Complexity     1550     1540      -10     
============================================
  Files           198      199       +1     
  Lines          8217     8325     +108     
  Branches       1317     1323       +6     
============================================
+ Hits           6337     6395      +58     
- Misses         1170     1230      +60     
+ Partials        710      700      -10     
Impacted Files Coverage Δ Complexity Δ
...xmanagement/rollup/actionfilter/FieldCapsFilter.kt 46.54% <62.29%> (-29.20%) 21.00 <14.00> (-7.00)
...ticsearch/indexmanagement/IndexManagementPlugin.kt 89.13% <62.50%> (-3.62%) 12.00 <2.00> (+1.00) ⬇️
...indexmanagement/rollup/actionfilter/SerDeHelper.kt 98.48% <98.48%> (ø) 0.00 <0.00> (?)
.../indexmanagement/rollup/settings/RollupSettings.kt 97.56% <100.00%> (+0.33%) 1.00 <0.00> (ø)
...nt/indexstatemanagement/model/destination/Slack.kt 40.90% <0.00%> (-13.64%) 2.00% <0.00%> (-2.00%)
...indexmanagement/rollup/model/RollupFieldMapping.kt 75.00% <0.00%> (-8.34%) 6.00% <0.00%> (-1.00%)
...nt/rollup/action/stop/TransportStopRollupAction.kt 65.30% <0.00%> (-2.05%) 8.00% <0.00%> (ø%)
...ndexstatemanagement/IndexStateManagementHistory.kt 78.26% <0.00%> (-1.74%) 26.00% <0.00%> (-1.00%)
...csearch/indexmanagement/rollup/util/RollupUtils.kt 79.25% <0.00%> (-1.25%) 0.00% <0.00%> (ø%)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1e59ad...66e91b0. Read the comment docs.

* TODO: When/if FieldCapabilitiesResponse and other subclasses package private constructors are elevated to public we can remove this logic.
*/

class ISMFieldCapabilitiesIndexResponse(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we split these into individual files with filenames as their classnames?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I think its better to contain these classes in a single file to keep the code contained at one place.

@thalurur thalurur merged commit a669d4c into opendistro-for-elasticsearch:main Mar 30, 2021
thalurur added a commit that referenced this pull request Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants