Open mhl opened 10 years ago
Although we can now import Pombola data using mongoimport there would still be significant downtime, both while the import is happening and when the elasticsearch reindexing is happening. Being able to rename databases in MongoDB seems to be a long-requested feature:
For the People's Assembly site our plan is to mirror the Pombola database to a corresponding PopIt interface using:
Unfortunately this takes a long time to run, because all the people organisation and memberships have to be deleted one by one to empty the database, and then recreated one by one. It would be nice to have (perhaps) some mechanism for POSTing PopIt entities into a temporary database and then renaming it into place, similar to the idiom for safely updating files via writing to a temporary file that's then atomically renamed into place.
... or find some other way of making it possible to do this kind of bulk update that may be slow (and may fail) without affecting use of the API by clients while it's happening.