Skip to content
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

Change bulk operation for metrics and index templates to support Open… #186

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

travisbenedict
Copy link
Contributor

…Search 2.0 as a data store

Signed-off-by: travisbenedict travisrb10@gmail.com

Description

Add support for OpenSearch 2.0 as a metrics data store by updating the MDS index templates, removing the doc_type argument from bulk requests and removing include_type_name from put template requests.

Issues Resolved

Closes #150

Check List

  • New functionality includes testing
    • All unit and integration tests pass
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…Search 2.0 as a data store

Signed-off-by: travisbenedict <travisrb10@gmail.com>
@engechas
Copy link
Contributor

This change was discussed a bit in #108. By merging this PR we are dropping support for metrics stores <ES7. This seems fine to me but there are sure to be other cases of ES/OS conflict in the future. It would be good to align on a decision about how to handle any and all of these conflicts going forwards.

Signed-off-by: travisbenedict <travisrb10@gmail.com>
@travisbenedict
Copy link
Contributor Author

This change was discussed a bit in #108. By merging this PR we are dropping support for metrics stores <ES7. This seems fine to me but there are sure to be other cases of ES/OS conflict in the future. It would be good to align on a decision about how to handle any and all of these conflicts going forwards.

I completely agree with you. A version support policy is something I'm planning to publish soon.

In this particular case I would argue that we implicitly dropped support for Elasticsearch as a data store back in #74 prior to the alpha release

if self._cluster_version[0] > 6:
self.guarded(opensearchpy.helpers.bulk, self._client, items, index=index, chunk_size=5000)
else:
self.guarded(opensearchpy.helpers.bulk, self._client, items, index=index, doc_type=doc_type, chunk_size=5000)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add some context on why removing metric store support for ES < 6 is needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing support for ES 6 and below is not explicitly needed but would require an additional maintenance burden for us. ES 7 deprecated certain parameters related to put template operations (more info here). If we want to continue supporting ES 6 as a data store we would need to create duplicates of the index templates and add some additional branching logic.

@travisbenedict travisbenedict merged commit 36742c8 into main Apr 19, 2022
@travisbenedict travisbenedict deleted the mds2 branch April 19, 2022 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove mapping types
4 participants