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

getSince implementation makes a multi-couch-db-to-one-elasticsearch-index setup impossible #14

Open
maxlath opened this issue Aug 23, 2016 · 2 comments · May be fixed by #19
Open

getSince implementation makes a multi-couch-db-to-one-elasticsearch-index setup impossible #14

maxlath opened this issue Aug 23, 2016 · 2 comments · May be fixed by #19

Comments

@maxlath
Copy link
Contributor

maxlath commented Aug 23, 2016

getSince takes its seq id from the targeted ElasticSearch index, which is then passed to follow to generated the CouchDB changes feed. Thus, several couch2elastic4sync processes following different CouchDB databases but putting docs to the same ElasticSearch index (typically under different types) would share the same seq id. The result is that only the database with the highest CouchDB seq number gets to trigger a change event

@ryanramage
Copy link
Owner

good point.

I think I will get the uuid from the source couch (eg found at http://localhost:5984/)
and the source couch db name to form a unique id for that couch database, eg

b896858f43d8b51206b466009997f8ca~dbname

and then store it at

http://elastic:9200/indexname/_mapping/seq~b896858f43d8b51206b466009997f8ca~dbname

That way it would be possible to have many sync processes not interfere with each other.

Thanks for this suggestion

@maxlath
Copy link
Contributor Author

maxlath commented May 11, 2017

FYI, it seems that the concept of types will be removed from ElasticSearch >= 6, so the use case of this issue might be discouraged in the future

@weareu weareu linked a pull request Sep 30, 2018 that will close this issue
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 a pull request may close this issue.

2 participants