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

Support migrating indexes to data streams. #2017

Open
anders-swanson opened this issue Jan 31, 2022 · 8 comments
Open

Support migrating indexes to data streams. #2017

anders-swanson opened this issue Jan 31, 2022 · 8 comments
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request

Comments

@anders-swanson
Copy link

Is your feature request related to a problem? Please describe.
OpenSearch supports both indexes and data streams. It would be good for users of an OpenSearch cluster to be able to seamlessly migrate their existing indexes to data stream.

Describe the solution you'd like
An API under _data_stream (.e.g., _data_stream/_migrate), that accepts a POST of the indexes to migrate to data streams.

Describe alternatives you've considered
I have been looking for a seamless way to migrate existing indexes to data streams (I want to take full advantage of data streams), without impacting the end-user experience. Not being able to migrate causes a poor user experience, as users may need to look at multiple data streams/indexes to get all their data.

@anders-swanson anders-swanson added enhancement Enhancement or improvement to existing feature or request untriaged labels Jan 31, 2022
@dblock
Copy link
Member

dblock commented Feb 2, 2022

What's the current workaround using client-side tools? Does that have downside other than performance (and how much)?

@anders-swanson
Copy link
Author

@dblock you may use the reindex API to migrate data from an existing index to a data stream, however the caveat is that existing index patterns may or may not match the new data stream name.
Any existing read/write clients must be updated to reference the data stream.

@dblock
Copy link
Member

dblock commented Mar 24, 2022

I don't think I fully understand this, help me out with an example?

@mgentry612
Copy link

@dblock
Copy link
Member

dblock commented Mar 6, 2023

Thanks. If anyone wants to contribute, please feel free to implement this feature in OpenSearch without looking at any non-APLv2 (ES) code.

@anubisg1
Copy link

anubisg1 commented Apr 6, 2023

i'm stuck with this and i am not sure i understand how to migrate within opensearch

@arianitu
Copy link

arianitu commented Jan 10, 2025

Can this be added? Right now if you use Amazon OpenSearch Service and migrate a data stream (backing indexes) to cold storage via an ISM policy, you can never add it back to the data stream.

This is problematic since that means it breaks everything you rely on when you use data streams (index patterns, etc) when migrating back from cold storage to warm/hot. You would basically need to add rules for the data stream its self and then the indexes that are migrated back from cold storage.

In my opinion, this makes data streams not very appealing at all. Also, is there any logic to not allowing an API that simply puts an index into an existing data stream, what's preventing that from being possible?

@arianitu
Copy link

arianitu commented Jan 10, 2025

Also, for Amazon OpenSearch, ISM policies don't even work on the data stream name directly (you must match the underlying Indices such as .ds-data-stream*) overall, I honestly feel like data stream integration is absolutely awful in OpenSearch. How can it even be released like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request
Projects
None yet
Development

No branches or pull requests

6 participants