Julien Castiaux b940d1c25f [FIX] base: allow concurrent insertion of triggers
Create a new cron job with a server action that sleeps 10 seconds, while
the cron is executing, triggers the cron. The trigger fails because the
implicit select performed by the foreign key on the ir_cron conflicts
with the lock acquired to execute the job.

When one access a record that references another table record with a
foreign key, a `KEY SHARE` lock try to acquire the referenced record in
order to prevent other transactions from removing it. The only lock that
conflicts with `KEY SHARE` is `UPDATE`.

When a job is acquired for execution, an `UPDATE` lock type was set on
the row. This ensure no other worker will select the same job but it
also prevent triggering the job as the trigger mechanism involve
inserting rows in the `ir_cron_trigger` table which have a foreign key
to the `ir_cron` table.

The `UPDATE` row lock was replaced by `NO KEY UPDATE` row lock. Just
like `UPDATE` the new row lock conflicts with all other locks BUT the
`KEY SHARE` lock that is acquired by foreign keys. The new lock type
still prevent multiple workers from acquiring the same cron
simultaneously but allow concurrent insertion of new triggers.

closes odoo/odoo#64424

Task: 2368911
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-01-12 15:46:01 +00:00
2021-01-14 09:55:11 +00:00
2020-04-20 11:41:39 +00:00
…
…
…
…
2019-11-08 11:24:04 +00:00
2020-09-28 14:07:25 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%