Open
Description
Table.update_or_insert()
and Table.validate_and_update_or_insert()
should use _for_update=True
when checking whether the record already exists. Otherwise there is a risk that the record will be deleted or (if it does not exist) inserted by a concurrent thread, leading to either database error or inconsistent data.
Adapters which don't support for_update
locking should just silently ignore the parameter instead of raising exception (or at most log a warning).