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

provide support for cloudant #26

Open
snowch opened this issue Mar 3, 2016 · 2 comments
Open

provide support for cloudant #26

snowch opened this issue Mar 3, 2016 · 2 comments

Comments

@snowch
Copy link

snowch commented Mar 3, 2016

Cloudant is based on the Apache-backed CouchDB project. Cloudant adds clustering to CouchDB and this functionality has been contributed back to Apache and will become part of CouchDB 2.0.

A few changes may be required to support Cloudant:

  1. Cloudant sequence identifiers can be any valid JSON type and not integers: https://docs.cloudant.com/database.html#get-changes.
  2. It is essential that consumers of changes feeds treat the updates they receive idempotently

It appears that to support item 1 - initial_sequence will need to be a Hash or Array couchdb_changes.rb#L65. The sequence will probably need to be parsed using JSON.parse() - couchdb_changes.rb#L163 to receive it as a Ruby Hash or Array.

It appears that item 2 should be supported for actions other than 'delete' as the metadata sets ElasticSearch to be updated if a document is reprocessed couchdb_changes.rb#208.

There may be an issue with re-processing deletes. If the delete has already occured in ElasticSearch - will the delete throw an exception couchdb_changes.rb#L204?

@rophy
Copy link

rophy commented May 3, 2017

I really need that sequence identifier support for cloudant. Any updates on this?

@kocolosk
Copy link

For what it's worth this is no longer just a Cloudant issue; CouchDB 2.x (over a year old now) also has this non-integer sequence format.

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

3 participants