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

CouchDB no longer supports all_or_nothing option for bulk_docs API #11009

Closed
amaltaro opened this issue Feb 24, 2022 · 1 comment · Fixed by #11011
Closed

CouchDB no longer supports all_or_nothing option for bulk_docs API #11009

amaltaro opened this issue Feb 24, 2022 · 1 comment · Fixed by #11011

Comments

@amaltaro
Copy link
Contributor

Impact of the new feature
WMCore in general (likely used by local/global workqueue and wmstats)

Is your feature request related to a problem? Please describe.
This all_or_nothing bulk operation option has been removed in CouchDB 2.0, see:
https://docs.couchdb.org/en/latest/whatsnew/2.0.html#upgrade-notes

As we migrate to CouchDB 3.x, we need to update our code such that we can keep remain as close as possible to an atomic transaction, even when multiple documents are created or updated.

Describe the solution you'd like
According to this documentation: https://docs.couchdb.org/en/latest/api/database/bulk-api.html#db-bulk-docs
we can make a nested dictionary/json with all the documents that we want to create or update in CouchDB. This should bring us closer to the all_or_nothing deprecated functionality (if not the same behavior).

So, the expected changes with this ticket are:

  • remove all the places defining this all_or_nothing flag
  • and update our CMSCouch code performing bulk operations such that it provides the correct data format to the bulk_docs API, a list of documents to be created/updated.

Describe alternatives you've considered
Max provided an initial proposal for fixing this, in: #10780

Additional context
A sub-task of #8853

@amaltaro
Copy link
Contributor Author

Moving it under the Waiting column because it can only go in once we migrate to CouchDB 3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant