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 an index / hotswapping / aliasing #21871

Closed
celesteking opened this issue Nov 29, 2016 · 2 comments
Closed

Renaming an index / hotswapping / aliasing #21871

celesteking opened this issue Nov 29, 2016 · 2 comments

Comments

@celesteking
Copy link

There should be a way to safely rename / revoke / reindex / manipulate an index.

Currently, I have to do the following:

  1. Create NEW index
  2. Copy (aka reindex) data from OLD to NEW
  3. Delete OLD index
  4. Make an alias/link from OLD index name to NEW index
  5. Do my stuff
  6. Delete OLD index alias
  7. Create OLD index
  8. Copy (aka reindex) data from NEW to OLD index.
  9. Delete OLD index.

3-4 transition is a race cond. If app is heavily writing to index, you're out of luck. Your index will be constantly created, you won't be able to even make an alias.
6-7 is a potential race condition.

To work around the problem, we need aliases to work with existing indexes.
Also, an index rename functionality should be implemented, so that entire 4-7 would not be needed.

@celesteking
Copy link
Author

celesteking commented Nov 29, 2016

+ Proper field mapping update should be implemented.

One of the advantages of noSQL is schema-less. I don't see how this is schemaless looking at 1-9 and all the manipulations I have to do if 1 tiny field wasn't "analyzerized" properly when it entered the database.

In SQL, I'd do "ALTER TABLE MODIFY COLUMN" and I'm done. This thing should really be better in this regard, or at least close.

@jasontedor
Copy link
Member

Duplicates #20064, duplicates #17426

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

No branches or pull requests

2 participants