-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Document revision value requirement when updating #498
Comments
I think you are mistaken in your belief that CouchDB no longer requires the revision value for updating a document.
|
You're right. It still requires rev for updates. Sorry, I wasn't aware of that I actually had rev passed in the call. Just curious, why would CouchDB team decided to have rev as required for an update? Why not design it as what GET /{db}/{docid} is where the default is always the latest rev if previous rev is wanted we can always pass it in the query parameter. |
Because CouchDB is eventually consistent by design - our entire replication structure (the key feature of CouchDB) requires revisions to be part of the API to ensure consistency. You can learn more about this at http:https://guide.couchdb.org/draft/consistency.html |
Thanks for the info! That's helpful. |
It seems like CouchDB 2 no longer requires revision value for updating an existing document (PUT /{db}/{docid}). It always updates the newest version of the document.
But attaching a file to a document (PUT /{db}/{docid}/{attname}) still requires a revision value.
Can we in the future just default rev to the newest version for attachments?
The text was updated successfully, but these errors were encountered: