openfoodfacts / openfoodfacts-query

This extracts key product data from MongoDB into a Postgres database to speed up OFF
GNU Affero General Public License v3.0
1 stars 0 forks source link

feat: Currently a full refresh will result in the service being unavailable #10

Closed john-gom closed 11 months ago

john-gom commented 12 months ago

Problem

When a full refresh is performed all products are first deleted before re-importing from MongoDB. If the service is called while this is happening then incomplete results will be returned

Proposed solution

Either create the new Products in some kind of staging area before deleting the old ones or update existing products in place without deleting first (will then need to delete anything that wasn't received during the import)

john-gom commented 11 months ago

Plan is to import in place. Should not need to delete products not in Mongo as presumably they will have been made obsolete?