Files
odoo_source/addons/base_import/models
Moisés López 9857b34fcc [FIX] base_import: mitigate concurrent update errors
Column mappings are updated in-place, if multiple users are importing records
of the same model at the same time, this will trigger concurrency errors.

This is made worse by the error only being reported on commit (after having
processed the entire import) and being retried automatically, so it slows down
the user and the entire system, the more concurrent imports the slower.

Log except:

    INFO dbname odoo.addons.base_import.models.base_import: done
    ERROR dbname odoo.sql_db: bad query: UPDATE "base_import_mapping" SET "field_name"='name',"write_uid"=%s,"write_date"=(now() at time zone 'UTC') WHERE id IN (%s)
    ERROR: could not serialize access due to concurrent update
    INFO dbname odoo.service.model: SERIALIZATION_FAILURE, retry 1/5 in 0.8720 sec...

closes odoo/odoo#57655

X-original-commit: 3f5e9ca625b53021c100245f5786bda4069974ad
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-14 13:40:19 +00:00
..