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

Renaming, and Backwards Compatibility for Indices #17

Closed
dblock opened this issue May 10, 2021 · 8 comments
Closed

Renaming, and Backwards Compatibility for Indices #17

dblock opened this issue May 10, 2021 · 8 comments

Comments

@dblock
Copy link
Member

dblock commented May 10, 2021

To track for #12

@hsiang9431-amzn
Copy link

Hi, for what dashboards team has done, changing the use for .kibana indices to .opensearch_dashboards, it appears to me supporting only an one way indices upgrade from opendistro to opensearch will make more sense.

Is this acceptable and should be applied to rest of the project?

Otherwise maintaining support for 2 sets of indices may cause major overhead in terms of code logic and testing. Please keep us posted on the decisions, it will help our team make decision down the road.

Thanks,

@saratvemulapalli
Copy link
Member

saratvemulapalli commented May 11, 2021

Sure definitely. Yes the indices are permanently renamed.
There are 2 parts to the answer:

  1. .opensearch_dashboards is the index which we will use going forward.
  2. Dashboards team and plugins should have backward compatibility support for .kibana in order to support drop in replacement for customers.

Similarly it's the same with opendistro indices.

@dblock dblock assigned dblock and unassigned saratvemulapalli May 12, 2021
@dblock
Copy link
Member Author

dblock commented May 12, 2021

When an OpenSearch with a plugin joins a cluster, check old name, and create the new one if that doesn't exist.

@cliu123
Copy link
Member

cliu123 commented May 12, 2021

When an OpenSearch with a plugin joins a cluster, check old name, and create the new one if that doesn't exist.

@dblock @saratvemulapalli
Is there a POC for this? We do not see an effective way to support both indices in plugins. If there is a POC for any solution, could you please provide?

@hsiang9431-amzn
Copy link

When an OpenSearch with a plugin joins a cluster, check old name, and create the new one if that doesn't exist.

Does this mean a new OpenSearch node will perform indices upgrade once it first join a cluster?

This approach makes more sense IMO and it is also be expandable to other plugins.
Maybe we should have a function in OpenSearch core that do this work and let plugins invoke it during plugin startup?

something like

public CreateAndCopy(final String oldIndex, final String newIndex) {
    // create new index
    // check if old index exist
    // if yes, copy the content to new index
}

If it's possible, adding the copy operation as a hook on index write for legacy indices should help keeping things coherent.

Is there a POC for this? We do not see an effective way to support both indices in plugins. If there is a POC for any solution, could you please provide?

Going with this approach, the additional tests should be surrounding added functions and on-write hooks. It should reduce the complexity comparing to supporting both.

@dblock
Copy link
Member Author

dblock commented May 13, 2021

When an OpenSearch with a plugin joins a cluster, check old name, and create the new one if that doesn't exist.

@dblock @saratvemulapalli
Is there a POC for this? We do not see an effective way to support both indices in plugins. If there is a POC for any solution, could you please provide?

I really just started looking into this, sorry :(

@dblock
Copy link
Member Author

dblock commented May 13, 2021

When an OpenSearch with a plugin joins a cluster, check old name, and create the new one if that doesn't exist.

Does this mean a new OpenSearch node will perform indices upgrade once it first join a cluster?

I don't think so, I think all Sarat is saying is that there's this if exists(old) { create alias or do nothing } else { create new } logic somewhere.

Duplicating indexes live at startup/joining a cluster just to rename them seems potentially extremely expensive and error-prone.

@dblock dblock changed the title Migrating indices Renaming, and Backwards Compatibility for Indices May 13, 2021
@saratvemulapalli
Copy link
Member

We have decided not to rename indices as it is a lot of work and increases the complexity.
I believe the only open question would be how do we take care of .kibana index, which is probably already being handled by opensearch-project/OpenSearch-Dashboards#334

@dblock can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants