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

Allow alias in place of index #163

Closed
j0hnsmith opened this issue Oct 31, 2013 · 2 comments
Closed

Allow alias in place of index #163

j0hnsmith opened this issue Oct 31, 2013 · 2 comments
Assignees
Milestone

Comments

@j0hnsmith
Copy link

I have an index files_v1 with an index files pointing to it. All is good when I use 'files_v1' as the index name in the mongo river config, but when I use the alias ('files') I get this error

[2013-10-31 12:24:55,331][WARN ][river.mongodb            ] [Arishem the Judge] [mongodb][mongodb] failed to create index [files], disabling river...
org.elasticsearch.indices.InvalidIndexNameException: [files] Invalid index name [files], an alias with the same name already exists
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:532)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$200(MetaDataCreateIndexService.java:86)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:171)
    at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:285)
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:143)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)

If the given index is an alias, mongo river should use the index it points to rather than attempt to create a new index.

@ghost ghost assigned richardwilly98 Oct 31, 2013
richardwilly98 added a commit that referenced this issue Nov 2, 2013
- Add check if alias / index exists before trying to create it.
@richardwilly98
Copy link
Owner

@j0hnsmith the river will now use the alias transparently if it has been setup.

@j0hnsmith
Copy link
Author

Great, thx.

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